Char::Elatin4 - Run-time routines for Char/Latin4.pm
use Char::Elatin4; Char::Elatin4::split(...); Char::Elatin4::tr(...); Char::Elatin4::chop(...); Char::Elatin4::index(...); Char::Elatin4::rindex(...); Char::Elatin4::lc(...); Char::Elatin4::lc_; Char::Elatin4::lcfirst(...); Char::Elatin4::lcfirst_; Char::Elatin4::uc(...); Char::Elatin4::uc_; Char::Elatin4::ucfirst(...); Char::Elatin4::ucfirst_; Char::Elatin4::ignorecase(...); Char::Elatin4::capture(...); Char::Elatin4::chr(...); Char::Elatin4::chr_; Char::Elatin4::glob(...); Char::Elatin4::glob_; # "no Char::Elatin4;" not supported
This module is a run-time routines of the Char/Latin4.pm. Because the Char/Latin4.pm automatically uses this module, you need not use directly.
I have tested and verified this software using the best of my ability. However, a software containing much regular expression is bound to contain some bugs. Thus, if you happen to find a bug that's in Char::Latin4 software and not your own program, you can try to reduce it to a minimal test case and then report it to the following author's address. If you have an idea that could make this a more useful tool, please let everyone share it.
This Char::Elatin4 module first appeared in ActivePerl Build 522 Built under MSWin32 Compiled at Nov 2 1999 09:52:28
INABA Hitoshi <ina@cpan.org>
This project was originated by INABA Hitoshi. For any questions, use <ina@cpan.org> so we can share this file.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@split = Char::Elatin4::split(/pattern/,$string,$limit); @split = Char::Elatin4::split(/pattern/,$string); @split = Char::Elatin4::split(/pattern/); @split = Char::Elatin4::split('',$string,$limit); @split = Char::Elatin4::split('',$string); @split = Char::Elatin4::split(''); @split = Char::Elatin4::split(); @split = Char::Elatin4::split; Scans a Latin-4 $string for delimiters that match pattern and splits the Latin-4 $string into a list of substrings, returning the resulting list value in list context, or the count of substrings in scalar context. The delimiters are determined by repeated pattern matching, using the regular expression given in pattern, so the delimiters may be of any size and need not be the same Latin-4 $string on every match. If the pattern doesn't match at all, Char::Elatin4::split returns the original Latin-4 $string as a single substring. If it matches once, you get two substrings, and so on. If $limit is specified and is not negative, the function splits into no more than that many fields. If $limit is negative, it is treated as if an arbitrarily large $limit has been specified. If $limit is omitted, trailing null fields are stripped from the result (which potential users of pop would do well to remember). If Latin-4 $string is omitted, the function splits the $_ Latin-4 string. If $patten is also omitted, the function splits on whitespace, /\s+/, after skipping any leading whitespace. If the pattern contains parentheses, then the substring matched by each pair of parentheses is included in the resulting list, interspersed with the fields that are ordinarily returned. Unlike Perl4, you cannot force the split into @_ by using ?? as the pattern delimiters, it only returns the list value.
$tr = Char::Elatin4::tr($variable,$bind_operator,$searchlist,$replacementlist,$modifier); $tr = Char::Elatin4::tr($variable,$bind_operator,$searchlist,$replacementlist); This function scans a Latin-4 string character by character and replaces all occurrences of the characters found in $searchlist with the corresponding character in $replacementlist. It returns the number of characters replaced or deleted. If no Latin-4 string is specified via =~ operator, the $_ variable is translated. $modifier are: ------------------------------------------------------ Modifier Meaning ------------------------------------------------------ c Complement $searchlist d Delete found but unreplaced characters s Squash duplicate replaced characters ------------------------------------------------------
$chop = Char::Elatin4::chop(@list); $chop = Char::Elatin4::chop(); $chop = Char::Elatin4::chop; Chops off the last character of a Latin-4 string contained in the variable (or Latin-4 strings in each element of a @list) and returns the character chopped. The Char::Elatin4::chop operator is used primarily to remove the newline from the end of an input record but is more efficient than s/\n$//. If no argument is given, the function chops the $_ variable.
$pos = Char::Elatin4::index($string,$substr,$position); $pos = Char::Elatin4::index($string,$substr); Returns the position of the first occurrence of $substr in Latin-4 $string. The start, if specified, specifies the $position to start looking in the Latin-4 $string. Positions are integer numbers based at 0. If the substring is not found, the Char::Elatin4::index function returns -1.
$pos = Char::Elatin4::rindex($string,$substr,$position); $pos = Char::Elatin4::rindex($string,$substr); Works just like Char::Elatin4::index except that it returns the position of the last occurence of $substr in Latin-4 $string (a reverse index). The function returns -1 if not found. $position, if specified, is the rightmost position that may be returned, i.e., how far in the Latin-4 string the function can search.
$lc = Char::Elatin4::lc($string); $lc = Char::Elatin4::lc_; Returns a lowercase version of Latin-4 string (or $_, if omitted). This is the internal function implementing the \L escape in double-quoted strings.
$lcfirst = Char::Elatin4::lcfirst($string); $lcfirst = Char::Elatin4::lcfirst_; Returns a version of Latin-4 string (or $_, if omitted) with the first character lowercased. This is the internal function implementing the \l escape in double- quoted strings.
$uc = Char::Elatin4::uc($string); $uc = Char::Elatin4::uc_; Returns an uppercased version of Latin-4 string (or $_, if string is omitted). This is the internal function implementing the \U escape in double-quoted strings.
$ucfirst = Char::Elatin4::ucfirst($string); $ucfirst = Char::Elatin4::ucfirst_; Returns a version of Latin-4 string (or $_, if omitted) with the first character uppercased. This is the internal function implementing the \u escape in double- quoted strings.
@ignorecase = Char::Elatin4::ignorecase(@string); This function is internal use to m/ /i, s/ / /i, split / /i and qr/ /i.
$capturenumber = Char::Elatin4::capture($string); This function is internal use to m/ /, s/ / /, split / / and qr/ /.
$chr = Char::Elatin4::chr($code); $chr = Char::Elatin4::chr_; This function returns the character represented by that $code in the character set. For example, Char::Elatin4::chr(65) is "A" in either ASCII or Latin-4, not Unicode, and Char::Elatin4::chr(0x82a0) is a Latin-4 HIRAGANA LETTER A. For the reverse of Char::Elatin4::chr, use Char::Latin4::ord.
@glob = Char::Elatin4::glob($string); @glob = Char::Elatin4::glob_; Performs filename expansion (DOS-like globbing) on $string, returning the next successive name on each call. If $string is omitted, $_ is globbed instead. This function function when the pathname ends with chr(0x5C) on MSWin32. For example, C<<..\\l*b\\file/*glob.p?>> on MSWin32 or UNIX will work as expected (in that it will find something like '..\lib\File/DosGlob.pm' alright). Note that all path components are case-insensitive, and that backslashes and forward slashes are both accepted, and preserved. You may have to double the backslashes if you are putting them in literally, due to double-quotish parsing of the pattern by perl. A tilde ("~") expands to the current user's home directory. Spaces in the argument delimit distinct patterns, so C<glob('*.exe *.dll')> globs all filenames that end in C<.exe> or C<.dll>. If you want to put in literal spaces in the glob pattern, you can escape them with either double quotes. e.g. C<glob('c:/"Program Files"/*/*.dll')>.
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install Char::Latin4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Char::Latin4
CPAN shell
perl -MCPAN -e shell install Char::Latin4
For more information on module installation, please visit the detailed CPAN module installation guide.