{"id":33899975,"url":"https://github.com/orchetect/swift-ascii","last_synced_at":"2026-01-13T20:53:26.816Z","repository":{"id":46415626,"uuid":"334323196","full_name":"orchetect/swift-ascii","owner":"orchetect","description":"ASCII String and Character types for Swift.","archived":false,"fork":false,"pushed_at":"2025-11-27T23:20:49.000Z","size":90,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T00:51:27.807Z","etag":null,"topics":["ascii","character","characters","ios","macos","string","strings","swift","swift5","swift5-3","tvos","watchos"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/orchetect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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":"orchetect"}},"created_at":"2021-01-30T03:58:09.000Z","updated_at":"2025-11-27T23:19:15.000Z","dependencies_parsed_at":"2024-01-15T09:06:39.992Z","dependency_job_id":"e5714e51-b9ae-4148-a517-48c26144b0cb","html_url":"https://github.com/orchetect/swift-ascii","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"ac8400915003e988d5f4d1c97e9339a95bc9e635"},"previous_names":["orchetect/swift-ascii"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/orchetect/swift-ascii","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-ascii","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-ascii/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-ascii/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-ascii/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orchetect","download_url":"https://codeload.github.com/orchetect/swift-ascii/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orchetect%2Fswift-ascii/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["ascii","character","characters","ios","macos","string","strings","swift","swift5","swift5-3","tvos","watchos"],"created_at":"2025-12-11T22:51:37.292Z","updated_at":"2026-01-13T20:53:26.811Z","avatar_url":"https://github.com/orchetect.png","language":"Swift","funding_links":["https://github.com/sponsors/orchetect"],"categories":[],"sub_categories":[],"readme":"# swift-ascii\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Forchetect%2Fswift-ascii%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/orchetect/swift-ascii) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Forchetect%2FSwiftASCII%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/orchetect/swift-ascii) [![License: MIT](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/orchetect/swift-ascii/blob/main/LICENSE)\n\nIntroduces `ASCIIString` and `ASCIICharacter` types for Swift offering validation and lossy conversion from `String`.\n\nComplete unit test coverage.\n\n## Installation\n\n### Swift Package Manager (SPM)\n\nTo add this package to an Xcode app project, use:\n\n `https://github.com/orchetect/swift-ascii` as the URL.\n\nTo add this package to a Swift package, add the dependency to your package and target in Package.swift:\n\n```swift\nlet package = Package(\n    dependencies: [\n        .package(url: \"https://github.com/orchetect/swift-ascii\", from: \"1.3.0\")\n    ],\n    targets: [\n        .target(\n            dependencies: [\n                .product(name: \"SwiftASCII\", package: \"swift-ascii\")\n            ]\n        )\n    ]\n)\n```\n\n## ASCIIString\n\n```swift\n// failable init\nASCIIString(exactly: \"An ASCII String.\") // succeeds\nASCIIString(exactly: \"Ãñ ÂŚÇÏÎ Strïńg.\") // nil\n\n// lossy string conversion making ASCII-compatible substitutions\nASCIIString(\"An ASCII String.\") // \"An ASCII String.\" (unchanged)\nASCIIString(\"Ãñ ÂŚÇÏÎ Strïńg.\") // \"An ASCII String.\" (substituted)\n\n// lossy string conversion through String literal type inference\nlet str: ASCIIString = \"Ãñ ÂŚÇÏÎ Strïńg.\"\nprint(str) // \"An ASCII String.\" (substituted)\n```\n\n```swift\nlet asciiString = ASCIIString(\"ÂŚÇÏÎ\")\n\n// returns typed as String\nasciiString.stringValue // \"ASCII\"\n\n// returns Data representation of string\nasciiString.rawData // Data([0x41, 0x53, 0x43, 0x49, 0x49])\n```\n\n### ASCIICharacter\n\n```swift\n// failable init\nASCIICharacter(exactly: \"A\") // succeeds\nASCIICharacter(exactly: \"Ω\") // nil\n\n// lossy string conversion making ASCII-compatible substitutions\nASCIICharacter(\"A\") // \"A\" (unchanged)\nASCIICharacter(\"Ã\") // \"A\" (substituted)\n\n// lossy character conversion through Character literal type inference\nlet char: ASCIICharacter = \"Ä\"\nprint(char) // \"A\" (substituted)\n\n// failable ASCII integer literal init\nASCIICharacter(65) // \"A\"\nASCIICharacter(300) // nil\n```\n\n```swift\nlet asciiString = ASCIICharacter(\"Ä\")\n\n// returns typed as Character\nasciiString.characterValue // Character(\"A\")\n\n// returns ASCII integer literal\nasciiString.asciiValue // 65\n\n// returns Data representation of character\nasciiString.rawData // Data([0x41])\n```\n\n## Author\n\nCoded by a bunch of 🐹 hamsters in a trenchcoat that calls itself [@orchetect](https://github.com/orchetect).\n\n## License\n\nLicensed under the MIT license. See [LICENSE](https://github.com/orchetect/swift-ascii/blob/master/LICENSE) for details.\n\n## Community \u0026 Support\n\nPlease do not email maintainers for technical support. Several options are available for issues and questions:\n\n- Questions and feature ideas can be posted to [Discussions](https://github.com/orchetect/swift-ascii/discussions).\n- If an issue is a verifiable bug with reproducible steps it may be posted in [Issues](https://github.com/orchetect/swift-ascii/issues).\n\n## Contributions\n\nContributions are welcome. Posting in [Discussions](https://github.com/orchetect/swift-ascii/discussions) first prior to new submitting PRs for features or modifications is encouraged.\n\n## Legacy\n\nThis repository was formerly known as SwiftASCII.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchetect%2Fswift-ascii","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forchetect%2Fswift-ascii","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forchetect%2Fswift-ascii/lists"}