323件ヒット
[1-100件を表示]
(0.151秒)
種類
- インスタンスメソッド (252)
- 特異メソッド (33)
- 関数 (22)
- 文書 (16)
クラス
-
Psych
:: ScalarScanner (22) -
Psych
:: Visitors :: YAMLTree (11) -
Scanf
:: FormatSpecifier (30) -
Scanf
:: FormatString (24) - String (22)
- StringScanner (143)
-
WEBrick
:: HTTPServer :: MountTable (11)
モジュール
- URI (22)
キーワード
-
NEWS for Ruby 2
. 7 . 0 (5) - [] (11)
- charpos (11)
- check (11)
-
check
_ until (11) - extract (22)
- getch (11)
- gsub (22)
-
last
_ match _ tried (6) - match (12)
- match? (11)
- matched (17)
- matched? (11)
-
matched
_ count (6) -
matched
_ size (11) -
matched
_ string (6) - matchedsize (11)
-
mid
_ match? (6) - new (11)
-
parse
_ time (11) -
post
_ match (11) -
pre
_ match (11) - prune (6)
-
rb
_ define _ method (11) -
rb
_ scan _ args (11) -
ruby 1
. 8 . 4 feature (11) -
search
_ full (11) - tokenize (11)
- width (6)
検索結果
先頭5件
-
WEBrick
:: HTTPServer :: MountTable # scan(path) -> Array (24201.0) -
与えられたパスをスクリプトの名前と PATH_INFO に分割します。
...与えられたパスをスクリプトの名前と PATH_INFO に分割します。
@param path パスを指定します。... -
StringScanner
# check _ until(regexp) -> String | nil (15300.0) -
regexp が一致するまで文字列をスキャンします。 マッチに成功したらスキャン開始位置からマッチ部分の末尾までの部分文字列を返します。 マッチに失敗したら nil を返します。
...したら nil を返します。
このメソッドはマッチが成功してもスキャンポインタを進めません。
@param regexp マッチに用いる正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.check_until(/str/) # =......> "test str"
s.matched # => "str"
s.pos # => 0
s.pre_match # => "test "
//}... -
StringScanner
# matched _ size -> Integer | nil (15218.0) -
前回マッチした部分文字列の長さを返します。 前回マッチに失敗していたら nil を返します。
...nil を返します。
マッチしたサイズは文字単位でなくバイト単位となります。
//emlist[][ruby]{
require 'strscan'
def run(encode)
utf8 = "\u{308B 3073 3044}" # るびい
s = StringScanner.new(utf8.encode(encode))
s.scan(/#{"\u{308B}".encode(encode)}/)
s.matched......_size
end
p run("UTF-8") #=> 3
p run("EUC-JP") #=> 2
p run("Shift_Jis") #=> 2
//}
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.matched_size # => nil
s.scan(/\w+/) # => "test"
s.matched_size # => 4
s.scan(/\w+/) # => nil
s.matched_size # => nil
//}... -
Scanf
:: FormatSpecifier # matched _ string (15200.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # mid _ match? (15200.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # width (15200.0) -
@todo
@todo -
Scanf
:: FormatString # last _ match _ tried (15200.0) -
@todo
@todo -
StringScanner
# matchedsize -> Integer | nil (15200.0) -
StringScanner#matched_size と同じです。
...StringScanner#matched_size と同じです。
このメソッドは は将来のバージョンで削除される予定です。
代わりに StringScanner#matched_size を使ってください。
@see StringScanner#matched_size... -
StringScanner
# post _ match -> String | nil (12230.0) -
前回マッチを行った文字列のうち、マッチしたところよりも後ろの 部分文字列を返します。前回のマッチが失敗していると常に nil を 返します。
...il を
返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.post_match # => nil
s.scan(/\w+/) # => "test"
s.post_match # => " string"
s.scan(/\w+/) # => nil
s.post_match # => nil
s.scan(/\s+/) # => " "
s.post_match # => "string"
s.scan(/\w+/) # => "stri......ng"
s.post_match # => ""
s.scan(/\w+/) # => nil
s.post_match # => nil
//}... -
StringScanner
# pre _ match -> String | nil (12230.0) -
前回マッチを行った文字列のうち、マッチしたところよりも前の 部分文字列を返します。前回のマッチが失敗していると常に nil を 返します。
...に nil を
返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.pre_match # => nil
s.scan(/\w+/) # => "test"
s.pre_match # => ""
s.scan(/\w+/) # => nil
s.pre_match # => nil
s.scan(/\s+/) # => " "
s.pre_match # => "test"
s.scan(/\w+/) # => "string"......s.pre_match # => "test "
s.scan(/\w+/) # => nil
s.pre_match # => nil
//}... -
StringScanner
# matched -> String | nil (12218.0) -
前回マッチした部分文字列を返します。 前回のマッチに失敗していると nil を返します。
...に失敗していると nil を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.matched # => nil
s.scan(/\w+/) # => "test"
s.matched # => "test"
s.scan(/\w+/) # => nil
s.matched # => nil
s.scan(/\s+/) # => " "
s.matched # => " "
//}...