super_p && web

my little piece of "work memory"

0 notes &

Cyrillic length problem

Ruby 1.8.7 (Ruby Enterprise Edition):

“string”.length # => 6

“строка”.length # => 12


Solution:

“string”.split(//).size # => 6

“строка”.split(//).size # => 6