From: Kornelius Kalnbach Date: 2010-01-26T02:30:51+09:00 Subject: [ruby-core:27820] [Feature #2645] Have a method in StringScanner which returns the position in characters rather than in bytes Issue #2645 has been updated by Kornelius Kalnbach. +1...but what to name it? * char_pos * chpos * index (like String#index) by the way, the documentation for StringScanner#pos states: In the 'terminated' position (i.e. the string is exhausted), this value is the length of the string. This is not true: irb(main):002:0> s = StringScanner.new('������'); s.scan(/.*/); s.pos => 6 irb(main):003:0> s.string.length => 3 ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2645 ---------------------------------------- http://redmine.ruby-lang.org