NAME
Unicode::Block - Class for unicode block manipulation.
SYNOPSIS
use Unicode::Block;
my $obj = Unicode::Block->new(%parameters);
my $item = $obj->next;
METHODS
new
my $obj = Unicode::Block->new(%parameters);
Constructor.
char_from
Character from.
Default value is '0000'.
char_to
Character to.
Default value is '007f'.
title
Title of block.
Default value is undef.
Returns instance of object.
next
my $item = $obj->next;
Get next character.
Returns Unicode::Block::Item object for character, if character exists. Returns undef, if character doesn't exist.
ERRORS
new():
From Class::Utils::set_params_pub():
Unknown parameter '%s'.
EXAMPLE
use strict;
use warnings;
use Unicode::Block;
use Unicode::UTF8 qw(encode_utf8);
# Object.
my $obj = Unicode::Block->new;
# Print all.
my $num = 0;
while (my $char = $obj->next) {
if ($num != 0) {
if ($num % 16 == 0) {
print "\n";
} else {
print " ";
}
}
print encode_utf8($char->char);
$num++;
}
print "\n";
# Output.
#
#
# ! " # $ % & ' ( ) * + , - . /
# 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
# @ A B C D E F G H I J K L M N O
# P Q R S T U V W X Y Z [ \ ] ^ _
# ` a b c d e f g h i j k l m n o
# p q r s t u v w x y z { | } ~
DEPENDENCIES
Class::Utils, Unicode::Block::Item.
SEE ALSO
- Unicode::Block::Ascii
-
Ascii output of unicode block.
- Unicode::Block::List
-
List of unicode blocks.
REPOSITORY
https://github.com/tupinek/Unicode-Block
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2013-2023 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.08