528件ヒット
[501-528件を表示]
(0.097秒)
ライブラリ
- strscan (528)
キーワード
- << (12)
- [] (12)
-
beginning
_ of _ line? (12) - bol? (12)
- charpos (12)
- check (12)
-
check
_ until (12) - clear (12)
- concat (12)
- empty? (12)
- eos? (12)
- exist? (12)
-
get
_ byte (12) - getbyte (12)
- getch (12)
- inspect (12)
- match? (12)
- matched (12)
- matched? (12)
-
matched
_ size (12) - matchedsize (12)
- peek (12)
- peep (12)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (12)
-
post
_ match (12) -
pre
_ match (12) - reset (12)
- rest (12)
- rest? (12)
-
rest
_ size (12) - restsize (12)
- scan (12)
-
scan
_ full (12) -
scan
_ until (12) -
search
_ full (12) - skip (12)
-
skip
_ until (12) - string (12)
- string= (12)
- terminate (12)
- unscan (12)
検索結果
-
StringScanner
# beginning _ of _ line? -> bool (24008.0) -
スキャンポインタが行頭を指しているなら true を、 行頭以外を指しているなら false を返します。
... true を、
行頭以外を指しているなら false を返します。
行頭の定義は、文字列先頭かまたは \n の直後を指していることです。
文字列末尾は必ずしも行頭ではありません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new("test......\nstring")
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
s.scan(/\n/)
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
//}... -
StringScanner
# bol? -> bool (24008.0) -
スキャンポインタが行頭を指しているなら true を、 行頭以外を指しているなら false を返します。
... true を、
行頭以外を指しているなら false を返します。
行頭の定義は、文字列先頭かまたは \n の直後を指していることです。
文字列末尾は必ずしも行頭ではありません。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new("test......\nstring")
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
s.scan(/\n/)
s.bol? # => true
s.scan(/\w+/)
s.bol? # => false
//}... -
StringScanner
# pos=(n) (24008.0) -
スキャンポインタのインデックスを n にセットします。
...。
@return n を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
p s.scan(/\w+/) # => "test"
p s.pos = 1 # => 1
p s.scan(/\w+/) # => "est"
p s.pos = 7 # => 7
p s.scan(/\w+/) # => "ring"
begin
s.pos = 20
rescue RangeError => err
puts err #=>......index out of range
end
p s.pos = -4 # => -4
p s.scan(/\w+/) # => "ring"
//}...