blob: 56bcef32745a0119f2d46440f60d3059cedc1054 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
call-seq:
pos -> byte_position
Returns the integer [byte position][2],
which may be different from the [character position][7]:
```
scanner = StringScanner.new(HIRAGANA_TEXT)
scanner.string # => "こんにちは"
scanner.pos # => 0
scanner.getch # => "こ" # 3-byte character.
scanner.charpos # => 1
scanner.pos # => 3
```
|