{"id":37206209,"url":"https://github.com/henry-sarabia/blank","last_synced_at":"2026-01-14T23:44:38.867Z","repository":{"id":57495843,"uuid":"170410954","full_name":"Henry-Sarabia/blank","owner":"Henry-Sarabia","description":"Detect blank strings or remove whitespace from strings","archived":false,"fork":false,"pushed_at":"2019-07-31T23:16:14.000Z","size":22,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T15:57:41.754Z","etag":null,"topics":["blank","blank-queries","character","checker","golang","helper","unicode","whitespace","whitespace-removal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Henry-Sarabia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-13T00:07:27.000Z","updated_at":"2025-08-27T12:19:17.000Z","dependencies_parsed_at":"2022-08-28T19:51:53.404Z","dependency_job_id":null,"html_url":"https://github.com/Henry-Sarabia/blank","commit_stats":null,"previous_names":["henry-sarabia/whitespace"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Henry-Sarabia/blank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Henry-Sarabia%2Fblank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Henry-Sarabia%2Fblank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Henry-Sarabia%2Fblank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Henry-Sarabia%2Fblank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Henry-Sarabia","download_url":"https://codeload.github.com/Henry-Sarabia/blank/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Henry-Sarabia%2Fblank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28439531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blank","blank-queries","character","checker","golang","helper","unicode","whitespace","whitespace-removal"],"created_at":"2026-01-14T23:44:38.396Z","updated_at":"2026-01-14T23:44:38.849Z","avatar_url":"https://github.com/Henry-Sarabia.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blank\n\n[![GoDoc](https://godoc.org/github.com/Henry-Sarabia/blank?status.svg)](https://godoc.org/github.com/Henry-Sarabia/blank)\n[![Build Status](https://travis-ci.com/Henry-Sarabia/blank.svg?branch=master)](https://travis-ci.com/Henry-Sarabia/blank)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Henry-Sarabia/blank)](https://goreportcard.com/report/github.com/Henry-Sarabia/blank)\n[![Coverage Status](https://coveralls.io/repos/github/Henry-Sarabia/blank/badge.svg?branch=master)](https://coveralls.io/github/Henry-Sarabia/blank?branch=master)\n\nThe **Blank** package offers two main functionalities.\n\n**Blank** can remove whitespace from a string.\nThe package defines whitepsace as a character that is not typically visible.\nThese characters range anywhere from the ordinary space to a less common vertical tab.\n\n**Blank** can check if a string is blank.\nThe package considers a string to be blank if it is comprised solely of whitespace.\n\n\n## Installation \n\nIf you do not have Go installed yet, you can find installation instructions \n[here](https://golang.org/doc/install).\n\nTo pull the most recent version of **Blank**, use `go get`.\n\n```\ngo get -u github.com/Henry-Sarabia/blank\n```\n\nThen import the package into your project.\n\n```go\nimport \"github.com/Henry-Sarabia/blank\"\n```\n\n## Usage\n\n### Whitespace Removal\n\nThe package considers whitespace to be any character that is not typically visible.\nThe most common of these characters are: space, tab, newline, return, formfeed, nonbreaking space, and vertical tab.\nFor more information, visit the [unicode package](https://golang.org/pkg/unicode/#IsSpace) and the [unicode seperator category](http://www.fileformat.info/info/unicode/category/Zs/list.htm).\n\nTo remove the whitespace from a string, use the `Remove` function.\n\n```go\nphrase := \"this is a phrase\"\n\nstr := blank.Remove(phrase)\n\nfmt.Println(str)\n// output: \"thisisaphrase\"\n```\n\n### Blank Detection\n\nThe package considers a string to be blank if it is comprised solely of whitespace.\n\nFor example, assume we are creating a search function that takes a string as a search query.\nWe want to avoid searching for blank queries.\nBlank queries can be detected using the `Is` function.\n\n```go\nfunc search(qry string) error {\n\tif blank.Is(qry) {\n\t\t// return error\n\t}\n\t\n\t// rest of code\n}\n```\n\nSimilarly, the `Has` function can process an entire slice of strings; it will check if any of the strings are blank.\n\nLet's slightly alter our example.\nAssume the search function takes a slice of strings as a list of queries.\nWe still want to avoid seraching for blank queries.\nBlank queries can be detected using the `Has` function.\n\n```go\nfunc search(qrs []string) error {\n\tif blank.Has(qrs) {\n\t\t// return error\n\t}\n\t\n\t// rest of code\n}\n```\n\n## Contributions\n\nIf you would like to contribute to this project, please adhere to the following guidelines.\n\n* Submit an issue describing the problem.\n* Fork the repo and add your contribution.\n* Add appropriate tests.\n* Run go fmt, go vet, and golint.\n* Prefer idiomatic Go over non-idiomatic code.\n* Follow the basic Go conventions found [here](https://github.com/golang/go/wiki/CodeReviewComments).\n* If in doubt, try to match your code to the current codebase.\n* Create a pull request with a description of your changes.\n\nI'll review pull requests as they come in and merge them if everything checks out.\n\nAny and all contributions are greatly appreciated. Thank you!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenry-sarabia%2Fblank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenry-sarabia%2Fblank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenry-sarabia%2Fblank/lists"}