{"id":22607860,"url":"https://github.com/patch/unicode-util-pm5","last_synced_at":"2025-03-28T22:19:54.916Z","repository":{"id":2050047,"uuid":"2987685","full_name":"patch/unicode-util-pm5","owner":"patch","description":"Unicode::Util module for Perl 5","archived":false,"fork":false,"pushed_at":"2013-03-01T04:23:30.000Z","size":336,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T08:48:03.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mogutt/TTServer","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patch.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-15T13:22:07.000Z","updated_at":"2014-09-09T00:10:32.000Z","dependencies_parsed_at":"2022-08-20T11:11:05.520Z","dependency_job_id":null,"html_url":"https://github.com/patch/unicode-util-pm5","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patch%2Funicode-util-pm5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patch%2Funicode-util-pm5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patch%2Funicode-util-pm5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patch%2Funicode-util-pm5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patch","download_url":"https://codeload.github.com/patch/unicode-util-pm5/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106697,"owners_count":20724401,"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":"2024-12-08T14:22:35.308Z","updated_at":"2025-03-28T22:19:54.883Z","avatar_url":"https://github.com/patch.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    Unicode::Util - Unicode grapheme-level versions of core Perl functions\n\nVERSION\n    This document describes Unicode::Util v0.10.\n\nSYNOPSIS\n        use Unicode::Util qw( grapheme_length grapheme_reverse );\n\n        # grapheme cluster ю́ (Cyrillic small letter yu, combining acute accent)\n        my $grapheme = \"ю\\x{301}\";\n\n        say length($grapheme);           # 2 (length in code points)\n        say grapheme_length($grapheme);  # 1 (length in grapheme clusters)\n\n        # Spın̈al Tap; n̈ = Latin small letter n, combining diaeresis\n        my $band = \"Spın\\x{308}al Tap\";\n\n        say scalar reverse $band;     # paT länıpS\n        say grapheme_reverse($band);  # paT lan̈ıpS\n\nDESCRIPTION\n    This module provides versions of core Perl string functions tailored to\n    work on Unicode grapheme clusters, which are what users perceive as\n    characters, as opposed to code points, which are what Perl considers\n    characters.\n\nFUNCTIONS\n    These functions all operate on character strings, not byte strings. They\n    are implemented using the \"\\X\" character class, which was introduced in\n    Perl v5.6 and significantly improved in v5.12 to properly match Unicode\n    extended grapheme clusters. An example of a notable change is that CR+LF\n    \u003c0x0D 0x0A\u003e is now considered a single grapheme cluster instead of two.\n    For that reason, as well as additional Unicode improvements, Perl v5.12\n    or greater is strongly recommended, both for use with this module and as\n    a language in general.\n\n    These functions may each be exported explicitly or by using the \":all\"\n    tag for everything.\n\n    grapheme_length($string)\n    grapheme_length\n        Works like \"length\" except the length is in number of grapheme\n        clusters.\n\n    grapheme_chop($string)\n    grapheme_chop(@array)\n    grapheme_chop(%hash)\n    grapheme_chop\n        Works like \"chop\" except it operates on the last grapheme cluster.\n\n    grapheme_reverse($string)\n    grapheme_reverse(@list)\n    grapheme_reverse\n        Works like \"reverse\" except it reverses grapheme clusters in scalar\n        context.\n\n    grapheme_index($string, $substring, $position)\n    grapheme_index($string, $substring)\n        Works like \"index\" except the position is in grapheme clusters.\n\n    grapheme_rindex($string, $substring, $position)\n    grapheme_rindex($string, $substring)\n        Works like \"rindex\" except the position is in grapheme clusters.\n\n    grapheme_substr($string, $offset, $length, $replacement)\n    grapheme_substr($string, $offset, $length)\n    grapheme_substr($string, $offset)\n        Works like \"substr\" except the offset and length are in grapheme\n        clusters.\n\nSEE ALSO\n    *   Unicode::GCString - String as sequence of UAX #29 grapheme clusters\n\n    *   Perl6::Str - Grapheme-level string implementation for Perl 5\n\n    *   String::Multibyte - Manipulation of multibyte character strings\n\n    *   \u003chttp://www.unicode.org/reports/tr29/\u003e - UAX #29: Unicode Text\n        Segmentation\n\n    *   \u003chttp://perlcabal.org/syn/S32/Str.html\u003e - Perl 6 Synopsis 32:\n        Setting Library—Str\n\nAUTHOR\n    Nick Patch \u003cpatch@cpan.org\u003e\n\nCOPYRIGHT AND LICENSE\n    © 2011–2013 Nick Patch\n\n    This library is free software; you can redistribute it and/or modify it\n    under the same terms as Perl itself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatch%2Funicode-util-pm5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatch%2Funicode-util-pm5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatch%2Funicode-util-pm5/lists"}