summaryrefslogtreecommitdiff
path: root/beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm
diff options
context:
space:
mode:
authorManuel Traut <manut@mecka.net>2011-04-29 09:09:27 +0200
committerManuel Traut <manut@mecka.net>2011-04-29 09:09:27 +0200
commit5238ad5a0c4a9e1c8cd036f5de4055e39bd71297 (patch)
tree4407c087b9fb5432b1dc11e70b52dacfa0b99feb /beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm
parent60ead65c41afba7e6aa4bbcf507a1d52f7a8fe9f (diff)
added debootstrap stuff
Signed-off-by: Manuel Traut <manut@mecka.net>
Diffstat (limited to 'beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm')
-rw-r--r--beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm78
1 files changed, 78 insertions, 0 deletions
diff --git a/beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm b/beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm
new file mode 100644
index 0000000..8f8c78d
--- /dev/null
+++ b/beagle/debian-rfs/usr/lib/perl5/Text/CharWidth.pm
@@ -0,0 +1,78 @@
+package Text::CharWidth;
+
+use 5.008;
+use strict;
+use warnings;
+
+require Exporter;
+
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(mbwidth mbswidth mblen);
+our @EXPORT = qw();
+our %EXPORT_TAGS = ('all' => [ @EXPORT_OK ]);
+
+our $VERSION = '0.04';
+
+require XSLoader;
+XSLoader::load('Text::CharWidth', $VERSION);
+
+# Preloaded methods go here.
+
+1;
+__END__
+# Below is stub documentation for your module. You'd better edit it!
+
+=head1 NAME
+
+Text::CharWidth - Get number of occupied columns of a string on terminal
+
+=head1 SYNOPSIS
+
+ use Text::CharWidth qw(mbwidth mbswidth mblen);
+ mbwidth(string);
+ mbswidth(string);
+ mblen(string);
+
+=head1 DESCRIPTION
+
+This module supplies features similar as wcwidth(3) and wcswidth(3)
+in C language.
+
+Characters have its own width on terminal depending on locale.
+For example, ASCII characters occupy one column per character,
+east Asian fullwidth characters (like Hiragana or Han Ideograph)
+occupy two columns per character, and combining characters (apperaring
+in ISO-8859-11 Thai, Unicode, and so on) occupy zero columns per
+character. mbwidth() gives the width of the first character of
+the given string and mbswidth() gives the width of the whole given
+string.
+
+The names of mbwidth and mbswidth came from "multibyte" versions
+of wcwidth and wcswidth which are "wide character" versions.
+
+I<mblen(string)> returns number of bytes of the first character of the
+string. Please note that a character may consist of multiple
+bytes in multibyte encodings such as UTF-8, EUC-JP, EUC-KR,
+GB2312, or Big5.
+
+I<mbwidth(string)> returns the width of the first character of the
+string. I<mbswidth(string)> returns the width of the whole string.
+
+Parameters are to be given in locale encodings, not always in UTF-8.
+
+=head1 SEE ALSO
+
+locale(5), wcwidth(3), wcswidth(3)
+
+=head1 AUTHOR
+
+Tomohiro KUBOTA, E<lt>kubota@debian.orgE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2003 by Tomohiro KUBOTA
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut