{"id":48805721,"url":"https://github.com/bbqsrc/stringly","last_synced_at":"2026-04-14T05:03:33.636Z","repository":{"id":329193956,"uuid":"1118403459","full_name":"bbqsrc/stringly","owner":"bbqsrc","description":"A Rust library providing generic string types parameterized by encoding.","archived":false,"fork":false,"pushed_at":"2025-12-31T19:41:21.000Z","size":1674,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-02T07:50:54.189Z","etag":null,"topics":["cesu8","codepages","encoding","gb18030","strings","utf-16","utf-32","utf-8","utf-ebcdic","utf7"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/bbqsrc.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},"funding":{"github":["bbqsrc"],"custom":"https://necessary.nu"}},"created_at":"2025-12-17T17:45:34.000Z","updated_at":"2025-12-31T19:41:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bbqsrc/stringly","commit_stats":null,"previous_names":["bbqsrc/stringly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bbqsrc/stringly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fstringly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fstringly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fstringly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fstringly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbqsrc","download_url":"https://codeload.github.com/bbqsrc/stringly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fstringly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"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":["cesu8","codepages","encoding","gb18030","strings","utf-16","utf-32","utf-8","utf-ebcdic","utf7"],"created_at":"2026-04-14T05:02:52.507Z","updated_at":"2026-04-14T05:03:33.628Z","avatar_url":"https://github.com/bbqsrc.png","language":"Rust","funding_links":["https://github.com/sponsors/bbqsrc","https://necessary.nu"],"categories":[],"sub_categories":[],"readme":"# stringly\n\nA Rust library providing generic string types parameterized by encoding.\n\n## Overview\n\n`stringly` provides `String\u003cE\u003e` and `Str\u003cE\u003e` types that work like `std`'s `String` and `str`, but are generic over their encoding. This allows you to:\n\n- Write encoding-agnostic code that works with UTF-8, UTF-16, UTF-32, and legacy encodings\n- Safely transcode between encodings\n- Use the same API you already know from `std`\n\n## Features\n\n- **Generic string types**: `String\u003cE\u003e` (owned) and `Str\u003cE\u003e` (borrowed) parameterized by encoding\n- **Full `std` API compatibility**: The same methods as `std::string::String` and `str`\n- **Pattern matching**: Generic `Pattern` trait for searching, splitting, and matching\n- **Transcoding**: Convert between any encodings via `chars()` iterators\n- **Feature-gated encodings**: Enable only the encodings you need\n\n## Supported Encodings\n\nCESU-8, GB18030, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, UTF-7, UTF-7-IMAP, UTF-8, UTF-EBCDIC, ATARIST, Big5, CP037, CP1006, CP1026, CP424, CP437, CP500, CP737, CP775, CP850, CP852, CP855, CP856, CP857, CP860, CP861, CP862, CP863, CP864, CP865, CP866, CP869, CP875, EUC-JP, EUC-KR, ISO-2022-JP, ISO-8859-1, ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, KOI8-R, KOI8-U, KZ1048, MacArabic, MacCeltic, MacCenteuro, MacChinsimp, MacChintrad, MacCroatian, MacCyrillic, MacDevanaga, MacDingbats, MacFarsi, MacGaelic, MacGreek, MacGujarati, MacGurmukhi, MacHebrew, MacIceland, MacInuit, MacJapanese, MacKeyboard, MacKorean, MacRoman, MacRomanian, MacSymbol, MacThai, MacTurkish, Shift_JIS, Windows-1250, Windows-1251, Windows-1252, Windows-1253, Windows-1254, Windows-1255, Windows-1256, Windows-1257, Windows-1258, Windows-874, Windows-932, Windows-936, Windows-949, Windows-950\n\n## Usage\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nstringly = \"0.0.0\"\n\n# Enable specific encodings\n[features]\ndefault = [\"stringly/unicode\"]  # UTF-16, UTF-32, GB18030, UTF-7, CESU-8, UTF-EBCDIC\n```\n\n### Basic Example\n\n```rust\nuse stringly::{String, Utf8};\n\n// Create a UTF-8 string - same API as std\nlet s: String\u003cUtf8\u003e = String::from(\"Hello, world!\");\nassert!(s.starts_with(\"Hello\"));\n```\n\n### Encoding-Generic Functions\n\n```rust\nuse stringly::{Str, Encoding};\n\n// Write functions that work with any encoding\nfn word_count\u003cE: Encoding\u003e(s: \u0026Str\u003cE\u003e) -\u003e usize {\n    s.split_whitespace().count()\n}\n```\n\n### Transcoding\n\n```rust\nuse stringly::{String, Utf8, Utf16Le, Iso8859_1};\n\n// Universal encodings can convert infallibly via From\nlet utf8: String\u003cUtf8\u003e = String::from(\"Hello\");\nlet utf16: String\u003cUtf16Le\u003e = String::from(utf8);\n\n// Limited encodings may fail if characters aren't representable\nlet utf8: String\u003cUtf8\u003e = String::from(\"Hello\");\nlet latin1: Option\u003cString\u003cIso8859_1\u003e\u003e = utf8.try_transcode();\n```\n\n## Feature Flags\n\n| Feature | Description |\n|---------|-------------|\n| `unicode` | **Default.** Enables `utf16`, `utf32`, `gb18030`, `utf7`, `cesu8`, `utf-ebcdic` |\n| `utf16` | UTF-16 LE/BE |\n| `utf32` | UTF-32 LE/BE |\n| `gb18030` | GB18030 (Chinese national standard) |\n| `utf7` | UTF-7 and UTF-7 IMAP |\n| `cesu8` | CESU-8 (compatibility encoding for UTF-16) |\n| `utf-ebcdic` | UTF-EBCDIC (Unicode on EBCDIC systems) |\n| `codepages` | All legacy codepages |\n| `codepages-iso8859` | ISO-8859-* family |\n| `codepages-windows` | Windows-* codepages |\n| `codepages-dos` | DOS codepages (CP437, etc.) |\n| `codepages-apple` | Apple codepages |\n| `codepages-misc` | Miscellaneous codepages |\n| `codepages-cjk` | Enables `euc-jp`, `iso-2022-jp`, `shift-jis`, `euc-kr`, `big5` |\n| `euc-jp` | EUC-JP |\n| `iso-2022-jp` | ISO-2022-JP (stateful) |\n| `shift-jis` | Shift_JIS |\n| `euc-kr` | EUC-KR |\n| `big5` | Big5 |\n| `registry` | Runtime encoding registry for CLI tools |\n\n## Encoding Traits\n\nThe library defines three levels of encoding capability:\n\n- **`Encoding`**: Base trait for all encodings. Provides character iteration, validation, and basic operations.\n- **`LimitedEncoding`**: Encodings that can represent a subset of Unicode (e.g., ISO-8859-1).\n- **`UniversalEncoding`**: Encodings that can represent all of Unicode (UTF-8, UTF-16, UTF-32, GB18030, UTF-7, CESU-8, UTF-EBCDIC).\n\n## License\n\nLicensed under either of Apache License, Version 2.0 or MIT license at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbqsrc%2Fstringly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbqsrc%2Fstringly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbqsrc%2Fstringly/lists"}