class

Ruby::V4::StringScanner

Inherits Reference < Object

Constructors

new(s : String)
Source

Instance methods

[](group : Int) : String | Nil
Source
[](name : String) : String | Nil
Source
beginning_of_line?
Source
check(re : Regex) : String | Nil
Source
eos?
Source
exist?(re : Regex) : Int32 | Nil

exist?: индекс конца ближайшего матча от pos (pos не двигается).

Source
getch
Source
match?(re : Regex) : Int32 | Nil
Source
matched
Source
matched?
Source
peek(n : Int) : String
Source
pos=(v : Int)
Source
post_match
Source
pre_match
Source
reset
Source
rest
Source
scan(re : Regex) : String | Nil
Source
scan_until(re : Regex) : String | Nil
Source
skip(re : Regex) : Int32 | Nil
Source
skip_until(re : Regex) : Int32 | Nil

skip_until: как scan_until, но возвращает длину съеденного.

Source
string
Source
string=(s : String) : String
Source
terminate
Source
unscan

unscan: откат к началу последнего успешного матча; без него — ошибка.

Source

Nested types