{"id":36891939,"url":"https://github.com/kaatinga/strconv","last_synced_at":"2026-01-12T15:38:08.580Z","repository":{"id":57703729,"uuid":"493390768","full_name":"kaatinga/strconv","owner":"kaatinga","description":"Fast and low memory consuming uint to string and string to uint converters","archived":false,"fork":false,"pushed_at":"2025-10-17T19:43:57.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-18T21:41:18.190Z","etag":null,"topics":["converter","fast","go","golang","high-performance","string","uint"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaatinga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-17T19:40:35.000Z","updated_at":"2025-10-17T19:44:01.000Z","dependencies_parsed_at":"2024-03-27T00:28:41.432Z","dependency_job_id":"bc8cf54d-7075-428f-aa09-896447c81177","html_url":"https://github.com/kaatinga/strconv","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/kaatinga/strconv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fstrconv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fstrconv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fstrconv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fstrconv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaatinga","download_url":"https://codeload.github.com/kaatinga/strconv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaatinga%2Fstrconv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["converter","fast","go","golang","high-performance","string","uint"],"created_at":"2026-01-12T15:38:07.326Z","updated_at":"2026-01-12T15:38:08.575Z","avatar_url":"https://github.com/kaatinga.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CodeQL](https://github.com/kaatinga/strconv/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/kaatinga/strconv/actions/workflows/github-code-scanning/codeql)\n[![GitHub release](https://img.shields.io/github/release/kaatinga/strconv.svg)](https://github.com/kaatinga/strconv/releases)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/kaatinga/strconv/blob/main/LICENSE)\n[![codecov](https://codecov.io/gh/kaatinga/strconv/branch/main/graph/badge.svg?token=TL88FINYP4)](https://codecov.io/gh/kaatinga/strconv)\n[![Go Tests](https://github.com/kaatinga/strconv/actions/workflows/golang_ci.yml/badge.svg)](https://github.com/kaatinga/strconv/actions/workflows/golang_ci.yml)\n[![help wanted](https://img.shields.io/badge/Help%20wanted-True-yellow.svg)](https://github.com/kaatinga/strconv/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)\n\n# The faststrconv package\n\nThe package contain several useful functions intended for conversion between string,\n[]byte and different integer types.\n\nFor the sake of code shortness, generics are used, it means the package requires go1.18+.\n\n## GetUint32(), GetUint16(), GetByte()\n\nThe functions are faster alternative to `strconv.Atoi()`.\n\n```\ngoos: darwin\ngoarch: arm64\npkg: github.com/kaatinga/strconv\nBenchmarkGetByte\nBenchmarkGetByte-8                             \t523370584\t         2.042 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkGetUint16\nBenchmarkGetUint16-8                           \t582942614\t         2.046 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkGetUint32\nBenchmarkGetUint32-8                           \t587540109\t         2.045 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkStrvconv_Atoi\nBenchmarkStrvconv_Atoi-8                       \t174534008\t         7.387 ns/op\t       0 B/op\t       0 allocs/op\nPASS\n```\n\n## Uint162String, Byte2String, etc\n\nThe functions are faster alternative to `strconv.Itoa()`.\n\n```\ngoos: darwin\ngoarch: arm64\npkg: github.com/kaatinga/strconv\ncpu: Apple M1\nBenchmarkByte2String\nBenchmarkByte2String-8                    \t70187169\t        19.01 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkUint162String\nBenchmarkUint162String-8                  \t44651092\t        27.47 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkUint322String\nBenchmarkUint322String-8                  \t42029007\t        29.80 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkUint642String\nBenchmarkUint642String-8                  \t38611280\t        31.20 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkUint32And642StringWithUint64\nBenchmarkUint32And642StringWithUint64-8   \t38078565\t        31.53 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkUint32And642StringWithUint32\nBenchmarkUint32And642StringWithUint32-8   \t37886760\t        31.42 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkItoa\nBenchmarkItoa-8                           \t20134200\t        58.28 ns/op\t       8 B/op\t       2 allocs/op\nPASS\n```\n\nWarning. For the sake of maximum processing speed, all the converters have limited support of the leading zeros.\nThe length of the string cannot exceed the maximum length of the string of every certain type. For example, `012` is\nsupported for the `byte` type, whereas `0255` is not as it consists of 4 characters what is impossible for `byte` type.\nIn case you process a date number, like month that is formatted with zero, like `09`, you can use the fast\nconverters of the strconv package directly, but if you still need to process formatted numbers like `0000000000000255` as byte, use\n`DeleteLeadingZeros` helper to remove leading zeros in the processed string first:\n\n```go\nnumberINeed, err = strconv.String2Byte(DeleteLeadingZeros(\"0000000000000255\"))\nif err != nil {\n\t...\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaatinga%2Fstrconv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaatinga%2Fstrconv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaatinga%2Fstrconv/lists"}