ライブラリ
- ビルトイン (148)
-
cgi
/ html (22) -
irb
/ cmd / help (11) -
net
/ imap (22) -
rubygems
/ specification (11) - stringio (110)
- strscan (143)
クラス
-
Gem
:: Specification (11) -
IRB
:: ExtendCommand :: Help (11) - MatchData (11)
-
Net
:: IMAP :: ContentDisposition (22) - String (129)
- StringIO (110)
- StringScanner (143)
- Symbol (8)
モジュール
-
CGI
:: HtmlExtension (22)
キーワード
- << (11)
- charpos (11)
- check (11)
-
check
_ until (11) - clear (11)
-
dsp
_ type (11) - eof (11)
- eof? (11)
- execute (11)
- form (22)
- index (11)
- insert (11)
- match (22)
- match? (16)
- param (11)
- pointer (11)
- pointer= (11)
- pos= (22)
-
post
_ match (22) - reset (11)
- rewind (11)
- rindex (11)
-
scan
_ until (11) - seek (11)
-
skip
_ until (11) - slice! (66)
- string= (11)
- tell (11)
- terminate (11)
- ungetc (11)
検索結果
先頭5件
-
Gem
:: Specification # post _ install _ message -> String (6202.0) -
インストール完了後に表示するメッセージを返します。
インストール完了後に表示するメッセージを返します。 -
MatchData
# post _ match -> String (6202.0) -
マッチした部分より後ろの文字列を返します($'と同じ)。
...マッチした部分より後ろの文字列を返します($'と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}
@see MatchData#pre_match... -
StringScanner
# pos=(n) (6132.0) -
スキャンポインタのインデックスを n にセットします。
...{
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.sc... -
StringIO
# tell -> Integer (6002.0) -
自身の現在の位置を返します。
自身の現在の位置を返します。 -
Net
:: IMAP :: ContentDisposition # param -> { String => String } | nil (3203.0) -
Content-Disposition フィールドのパラメータをハッシュテーブルで 返します。
...Content-Disposition フィールドのパラメータをハッシュテーブルで
返します。
ハッシュテーブルのキーは以下のような値を取ります。詳しくは
2183 などを見てください。
* "FILENAME"
* "CREATION-DATE"
* "MODIFICATION-DATE"
* "READ-DAT"... -
StringScanner
# check(regexp) -> String | nil (3114.0) -
現在位置から regexp とのマッチを試みます。 マッチに成功したらマッチした部分文字列を返します。 マッチに失敗したら nil を返します。
...を進めません。
@param regexp マッチに用いる正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.check(/\w+/) # => "test"
s.pos # => 0
s.matched # => "test"
s.check(/\s+/) # => nil
s.matched # => nil
//}... -
StringScanner
# check _ until(regexp) -> String | nil (3114.0) -
regexp が一致するまで文字列をスキャンします。 マッチに成功したらスキャン開始位置からマッチ部分の末尾までの部分文字列を返します。 マッチに失敗したら 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
# scan _ until(regexp) -> String | nil (3114.0) -
regexp で指定された正規表現とマッチするまで文字列をスキャンします。 マッチに成功したらスキャンポインタを進めて、 スキャン開始位置からマッチ部分の末尾までの部分文字列を返します。 マッチに失敗したら nil を返します。
...を返します。
@param regexp マッチに用いる正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.scan_until(/str/) # => "test str"
s.matched # => "str"
s.pos # => 8
s.pre_match # => "test "
//}... -
Net
:: IMAP :: ContentDisposition # dsp _ type -> String (3102.0) -
Content-Disposition フィールドのタイプを文字列で返します。
...Content-Disposition フィールドのタイプを文字列で返します。
"INLINE", "ATTACHMENT" などの文字列を返します。
詳しくは 2183 などを見てください。... -
StringIO
# ungetc(str _ or _ int) -> nil (3073.0) -
文字列か整数で指定された str_or_int を自身に書き戻します。 nil を返します。
...ire "stringio"
s = StringIO.new("hoge")
s.pos = 1
s.ungetc("H")
p s.string # => "Hoge"
p s.pos # => 0
s = StringIO.new("hoge")
s.pos = 1
s.ungetc("H".ord)
p s.string # => "Hoge"
p s.pos # => 0
s = StringIO.new("hoge")
s.pos = 4
s.ungetc("HOGE")
p s.string # => "hogHOGE"
p s.pos......# => 3
s = StringIO.new("hoge")
s.pos = 8
s.ungetc("A")
p s.string # => "hoge\000\000\000A"
p s.pos # => 7
//}...