{"id":13413994,"url":"https://github.com/trubitsyn/go-zero-width","last_synced_at":"2025-03-14T20:30:58.215Z","repository":{"id":57486637,"uuid":"137758055","full_name":"trubitsyn/go-zero-width","owner":"trubitsyn","description":"Zero-width character detection and removal for Go","archived":true,"fork":false,"pushed_at":"2020-08-06T14:29:12.000Z","size":23,"stargazers_count":109,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:53:13.943Z","etag":null,"topics":["golang","zero-width","zero-width-space"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trubitsyn.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":"2018-06-18T13:55:09.000Z","updated_at":"2024-04-08T13:31:23.000Z","dependencies_parsed_at":"2022-09-01T20:31:09.910Z","dependency_job_id":null,"html_url":"https://github.com/trubitsyn/go-zero-width","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubitsyn%2Fgo-zero-width","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubitsyn%2Fgo-zero-width/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubitsyn%2Fgo-zero-width/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubitsyn%2Fgo-zero-width/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trubitsyn","download_url":"https://codeload.github.com/trubitsyn/go-zero-width/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221504067,"owners_count":16833950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","zero-width","zero-width-space"],"created_at":"2024-07-30T20:01:54.705Z","updated_at":"2024-10-26T06:30:33.123Z","avatar_url":"https://github.com/trubitsyn.png","language":"Go","funding_links":[],"categories":["文本处理","Text Processing","Bot Building","文本处理`解析和操作文本的代码库`","Specific Formats"],"sub_categories":["实用程序/Miscellaneous","Utility/Miscellaneous","HTTP Clients","查询语"],"readme":"# go-zero-width [![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go) [![Golang Weekly #241](https://img.shields.io/badge/Golang%20Weekly-%23241-2CB3E5.svg)](https://golangweekly.com/issues/241) [![Golang Weekly #241](https://img.shields.io/badge/Golang%20Weekly-%23295-2CB3E5.svg)](https://golangweekly.com/issues/295) [![Build Status](https://travis-ci.org/trubitsyn/go-zero-width.svg?branch=master)](https://travis-ci.org/trubitsyn/go-zero-width) [![GoDoc](https://godoc.org/github.com/trubitsyn/go-zero-width?status.svg)](https://godoc.org/github.com/trubitsyn/go-zero-width) [![Go Report Card](https://goreportcard.com/badge/github.com/trubitsyn/go-zero-width)](https://goreportcard.com/report/github.com/trubitsyn/go-zero-width)\nZero-width character detection and removal for Go. Inspired by [this Medium article](https://medium.com/@umpox/be-careful-what-you-copy-invisibly-inserting-usernames-into-text-with-zero-width-characters-18b4e6f17b66).\n\n## Installation\n`go get github.com/trubitsyn/go-zero-width`\n\n## Usage\n\u003cpre\u003e\npackage main\n\nimport (\n\t\"github.com/trubitsyn/go-zero-width\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tlogin := \"abc​def\"\t\t\t\t\t// zero-width space between \"c\" and \"d\"\n\tclean := zerowidth.RemoveZeroWidthCharacters(login)\t// a  b  c           d  e  f\n\tfmt.Printf(\"% x\\n\", login)\t\t\t\t// 61 62 63 \u003cb\u003ee2 80 8b\u003c/b\u003e 64 65 66\n\tfmt.Printf(\"% x\\n\", clean)\t\t\t\t// 61 62 63          64 65 66\n}\n\u003c/pre\u003e\n\n## Supported characters\n* Zero-width space (U+200B)\n* Zero-width no-break space (U+FEFF)\n* Zero-width joiner (U+200D)\n* Zero-width non-joiner (U+200C)\n\n## Testing\n```\ngo get -t github.com/trubitsyn/go-zero-width\ngo test github.com/trubitsyn/go-zero-width\n```\n\n## LICENSE\n```\nCopyright 2018 Nikola Trubitsyn\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrubitsyn%2Fgo-zero-width","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrubitsyn%2Fgo-zero-width","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrubitsyn%2Fgo-zero-width/lists"}