diff options
| author | fukachan <fukachan> | 2001-02-18 13:58:58 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-18 13:58:58 +0000 |
| commit | c9fecfec8aab796a9f36c44c220f0be95a50a0cc (patch) | |
| tree | dfef6d4b1b4a084808912509d38e7a82a08cfe5d | |
| parent | 68f0651435b6ab5486ce884fdaaf10364194552c (diff) | |
| download | fml8-c9fecfec8aab796a9f36c44c220f0be95a50a0cc.tar.gz fml8-c9fecfec8aab796a9f36c44c220f0be95a50a0cc.tar.bz2 fml8-c9fecfec8aab796a9f36c44c220f0be95a50a0cc.zip | |
cleanup
| -rw-r--r-- | fml/lib/FML/String.pm | 66 |
1 files changed, 32 insertions, 34 deletions
diff --git a/fml/lib/FML/String.pm b/fml/lib/FML/String.pm index b1246eb3..17cf010f 100644 --- a/fml/lib/FML/String.pm +++ b/fml/lib/FML/String.pm @@ -9,68 +9,66 @@ # package FML::String; - +use strict; use Carp; +=head1 NAME + +FML::String -- utilities to manipulate strings + +=head1 SYNOPSIS + + use FML::String qw(STR2JIS); + $euc_str = STR2JIS($str); + +=head1 METHOD + +=head2 C<STR2JIS(string)> + +convert CHARSET of the given string to JIS. + +=head2 C<STR2EUC(string)> + +convert CHARSET of the given string to EUC. + +=head2 C<STR2SJIS(string)> + +convert CHARSET of the given string to SJIS. + +=cut + + require Exporter; @ISA = qw(Exporter); -@EXPORT_OK = qw(STR2JIS STR2EUC); +@EXPORT_OK = qw(STR2JIS STR2EUC STR2SJIS); -use strict; +use Jcode; -sub AUTOLOAD -{ - print STDERR "bad AUTOLOAD()\n"; -} sub STR2EUC { my ($str) = @_; - - use Jcode; &Jcode::convert(\$str, 'euc'); + $str; } sub STR2JIS { my ($str) = @_; - - use Jcode; &Jcode::convert(\$str, 'jis'); + $str; } sub STR2SJIS { my ($str) = @_; - - use Jcode; &Jcode::convert(\$str, 'sjis'); + $str; } -=head1 NAME - -FML::String -- utilties to manipulate strings - -=head1 SYNOPSIS - -=head1 METHOD - -=item STR2JIS(string) - -convert CHARSET of the given string to JIS. - -=item STR2EUC(string) - -convert CHARSET of the given string to EUC. - -=item STR2SJIS(string) - -convert CHARSET of the given string to SJIS. - - =head1 AUTHOR Ken'ichi Fukamachi |
