{"id":27401278,"url":"https://github.com/edjcase/motoko_text","last_synced_at":"2026-02-09T15:33:55.706Z","repository":{"id":101288197,"uuid":"603924711","full_name":"edjCase/motoko_text","owner":"edjCase","description":"A motoko library for text manipulation","archived":false,"fork":false,"pushed_at":"2025-02-08T05:15:32.000Z","size":192,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T06:20:52.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Motoko","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/edjCase.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T00:15:54.000Z","updated_at":"2025-02-08T05:15:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5fbe63b-df42-4581-b8d4-dcc931354cbb","html_url":"https://github.com/edjCase/motoko_text","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"edjCase/motoko-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edjCase%2Fmotoko_text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edjCase%2Fmotoko_text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edjCase%2Fmotoko_text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edjCase%2Fmotoko_text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edjCase","download_url":"https://codeload.github.com/edjCase/motoko_text/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819369,"owners_count":21166474,"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":[],"created_at":"2025-04-14T03:54:39.245Z","updated_at":"2026-02-09T15:33:55.145Z","avatar_url":"https://github.com/edjCase.png","language":"Motoko","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextX: Advanced Text Manipulation for Motoko\n\nTextX is a text manipulation library for Motoko\n\n## Installation\n\n```bash\nmops install xtended-text\n```\n\nTo setup MOPS package manage, follow the instructions from the\n[MOPS Site](https://j4mwm-bqaaa-aaaam-qajbq-cai.ic0.app/)\n\n## Quick Start\n\nHere's a quick example to get you started:\n\n```motoko\nimport TextX \"mo:xtended-text/TextX\";\n\nlet text = \"Hello, World!\";\nlet lowercased = TextX.toLower(text);\nassert(lowercased == \"hello, world!\");\n\nlet sliced = TextX.slice(text, 7, 5);\nassert(sliced == \"World\");\n\nlet isEmpty = TextX.isEmpty(\"\");\nassert(isEmpty);\n```\n\n## Modules\n\n### CharX\n\nProvides character-level operations:\n\n- `toLower(char : Char) : Char`: Converts a character to lowercase.\n- `toUpper(char : Char) : Char`: Converts a character to uppercase.\n\n### TextX\n\nOffers a wide range of text manipulation functions:\n\n- `toLower(text : Text) : Text`: Converts all characters in the text to\n  lowercase.\n- `toUpper(text : Text) : Text`: Converts all characters in the text to\n  uppercase.\n- `slice(text : Text, startIndex : Nat, length : Nat) : Text`: Extracts a\n  substring from the given text.\n- `sliceToEnd(text : Text, startIndex : Nat) : Text`: Extracts a substring from\n  the given index to the end of the text.\n- `fromUtf8Bytes(bytes : Iter.Iter\u003cNat8\u003e) : Iter.Iter\u003cChar\u003e`: Converts UTF-8\n  bytes to characters.\n- `toUtf8Bytes(characters : Iter.Iter\u003cChar\u003e) : Iter.Iter\u003cNat8\u003e`: Converts\n  characters to UTF-8 bytes.\n- `isEmpty(text : Text) : Bool`: Checks if the text is empty.\n- `isEmptyOrWhitespace(text : Text) : Bool`: Checks if the text is empty or\n  contains only whitespace.\n\n# Testing\n\n```\nmops test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedjcase%2Fmotoko_text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedjcase%2Fmotoko_text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedjcase%2Fmotoko_text/lists"}