NAME
Unicode::ICU::MessagePatternPart
SYNOPSIS
my $parse = Unicode::ICU::MessagePattern->new('My name is {name}.');
my $part = $parse->get_part(0);
DESCRIPTION
This class implements functionality for MessagePattern parts.
It is not directly instantiated.
COMPATIBILITY
This requires ICU 4.8 or later.
SEE ALSO
CONSTANTS
%PART_TYPE
Name-value map corresponding to ICU’s UMessagePatternPartType enum.
%ARG_TYPE
Name-value map corresponding to ICU’s UMessagePatternArgType enum.
METHODS
The following match their C++ counterparts:
type()(cf. Unicode::ICU’s%UMSGPAT_PART_TYPE)arg_type()(cf. Unicode::ICU’s%UMSGPAT_ARG_TYPE)value()
The following are like their C++ counterparts but return actual character indices, not UChar * indices:
index()length()limit()
Getting actual character indices matters if your pattern contains emoji, CJK, or other code points outside Unicode’s Basic Multilingual Plane, i.e., 0 - 0xFFFF.