In Perl 6 you get list length using `elems`. E.g. for a string: > "A".elems 1 > "string".elems 1 > "".elems 1
-
-
The documentation for Str.length http://doc.perl6.org/type/Str#method_length … says "See `chars` or `elems`." I'm going to say you probably want `chars`
-
The string length method isn't `length` is because there's more than one way to define it. For example, it could always be 1
End of conversation
New conversation -
-
-
@qntm I'm mad.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@qntm so how do I find the length of a string then? -
@andrewp823 According to http://doc.perl6.org/type/Str#method_length … you have to use `chars`. Not sure why they didn't use `length`. - 2 more replies
New conversation -
-
-
@qntm I do hate when dynamic languages treat strings as arraysThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.