String::Multibyte

String::Multibyte allows the manipulation of multibyte character strings.
Download

String::Multibyte Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Tomoyuki SADAHIRO
  • Publisher web site:
  • http://search.cpan.org/~sadahiro/String-Multibyte-1.05/Multibyte.pm

String::Multibyte Tags


String::Multibyte Description

String::Multibyte allows the manipulation of multibyte character strings. String::Multibyte allows the manipulation of multibyte character strings.SYNOPSIS use String::Multibyte; $utf8 = String::Multibyte->new('UTF8'); $utf8_len = $utf8->length($utf8_str);This module provides some functions which emulate the corresponding CORE functions for locale-independent manipulation of multiple-byte character strings.Why this module is locale-independent? Well, because this module only consider the byte sequence structure of charsets and is not aware of any Locale stuff! Locale-dependent methods like uc(), lc(), etc., will not be supported at all.Definition of Multibyte CharsetsThe definition files are sited under the directory where String::Multibyte is sited. E.g. if String::Multibyte is perl/site/lib/String/Multibyte.pm, copy String::Multibyte::Foo as perl/site/lib/String/Multibyte/Foo.pm.The definition file must return a hashref, having key(s) named as following.charsetThe value for the key 'charset' stands for a string of the charset name. In almost case, omission of the 'charset' matters very little, but keep them not conflict among another charset.regexpThe value for the key 'regexp', REQUIRED, is a regular expression that matchs a single character of charset in question. (You may use qr// if available.)If the 'regexp' is omitted, calling any method is croaked.nextcharThe value for the key 'nextchar' must be a coderef that returns the next character to the specified character. If the 'nextchar' coderef is omitted, mkrange() and strtr() methods don't understand hyphen metacharacter for character ranges.cmpcharThe value for the key 'cmpchar' must be a coderef that compares the specified two characters. If the 'cmpchar' coderef is omitted, mkrange and strtr functions don't understand reverse character ranges.hyphenThe value for the key 'hyphen' is a character to stand for a character range. The default is '-'.escapeThe value for the key 'escape' is an escape character for a hyphen character. The default is '\'. The 'escape' character is valid only before a hyphen or another 'escape' (e.g. '\-]' means '\' to ']'; '\-]' means '\', '-', and ']'). If an 'escape' character is followed by any character other than 'escape' or 'hyphen', it is parsed literally.Requirements:· Perl


String::Multibyte Related Software