develooper Front page | perl.perl6.language | Postings from August 2006

String length

Reed, Mark
August 17, 2006 09:30
String length
Message ID:
S02 states that there is no ".length" method on Str's (or for cumulative
element length of Arrays);  you have to ask explicitly for the units you
want to count .  But then it goes on to define the StrPos and StrLen
types, which are unit-agnostic.  So why not have a .length that returns
a StrLen?   I envison some method or sub wanting to have access to the
length of a string, without necessarily having the string itself
available, in a context where the caller wouldn't know what level of
Unicode abstraction to use. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About