stdlib/strscan/0/string_scanner.rbs in rbs-3.0.0.dev.2 vs stdlib/strscan/0/string_scanner.rbs in rbs-3.0.0.dev.3

- old
+ new

@@ -1,9 +1,11 @@ # <!-- rdoc-file=ext/strscan/strscan.c --> # StringScanner provides for lexical scanning operations on a String. Here is # an example of its usage: # +# require 'strscan' +# # s = StringScanner.new('This is an example string') # s.eos? # -> false # # p s.scan(/\w+/) # -> "This" # p s.scan(/\w+/) # -> nil @@ -197,14 +199,14 @@ # this value is zero. In the 'terminated' position (i.e. the string is # exhausted), this value is the size of the string. # # In short, it's a 0-based index into the string. # - # s = StringScanner.new("abcädeföghi") - # s.charpos # -> 0 - # s.scan_until(/ä/) # -> "abcä" - # s.pos # -> 5 - # s.charpos # -> 4 + # s = StringScanner.new("abc\u00e4def\u00f6ghi") + # s.charpos # -> 0 + # s.scan_until(/\u00e4/) # -> "abc\u00E4" + # s.pos # -> 5 + # s.charpos # -> 4 # def charpos: () -> Integer # <!-- # rdoc-file=ext/strscan/strscan.c