Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Trying to determine the output length of a Unicode string

by ikegami (Patriarch)
on Sep 26, 2011 at 00:04 UTC ( [id://927777]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @graphemes = $text =~ /\X/g;
    my $count = () = $text =~ /\X/g;
    
  2. or download this
    my $size = Unicode::GCString->new($text)->columns();
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://927777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-19 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found