種類
- インスタンスメソッド (439)
- 特異メソッド (165)
- 文書 (22)
- 定数 (22)
- 関数 (9)
ライブラリ
クラス
-
ARGF
. class (11) - CSV (11)
-
CSV
:: Row (11) - DateTime (88)
-
Encoding
:: Converter (33) - Enumerator (22)
-
Enumerator
:: Lazy (10) -
Fiddle
:: Pointer (22) - IO (146)
- MatchData (26)
-
Net
:: FTP (44) - Pathname (22)
-
Psych
:: SyntaxError (11) - Regexp (22)
- Socket (11)
- String (4)
- StringIO (11)
- Time (77)
-
WIN32OLE
_ METHOD (11)
モジュール
- Enumerable (22)
-
Socket
:: Constants (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
IPV6
_ CHECKSUM (22) - [] (22)
-
_ strptime (11) - advise (11)
- binread (11)
- binwrite (22)
- byteindex (2)
- byteoffset (4)
- byterindex (2)
- civil (11)
- commercial (11)
-
copy
_ stream (22) - delete (11)
-
each
_ with _ index (22) - getlocal (22)
-
gmt
_ offset (11) - gmtoff (11)
- jd (11)
- localtime (22)
- match (22)
- new (11)
-
new
_ offset (11) -
offset
_ vtbl (11) - ordinal (11)
- pread (7)
-
primitive
_ convert (33) - pwrite (7)
-
rb
_ time _ timespec _ new (9) - read (33)
- retrbinary (22)
-
ruby 1
. 9 feature (11) - seek (44)
- storbinary (22)
- sysseek (11)
-
utc
_ offset (11) -
with
_ index (32) - write (33)
検索結果
先頭5件
-
DateTime
# offset -> Rational (21301.0) -
時差を返します。
時差を返します。 -
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (18451.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
...nd] を返
します。
//emlist[例][ruby]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で......//emlist[例][ruby]{
/(?<year>\d{4})年(?<month>\d{1,2})月(?:(?<day>\d{1,2})日)?/ =~ "2021年1月"
p $~.offset('year') # => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('centu......ry') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end......ry') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end, MatchData#offset... -
MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] (18416.0) -
n 番目の部分文字列のオフセットの配列 [start, end] を返 します。
...列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(n), self.end(n) ]
//}
と同じです。n番目の部分文字列がマッチしていなければ
[nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した......場合に発生します。
@see MatchData#begin, MatchData#end......場合に発生します。
@see MatchData#begin, MatchData#end, MatchData#offset... -
Psych
:: SyntaxError # offset -> Integer (18323.0) -
エラーが生じた位置の offset をバイト数で 返します。
...エラーが生じた位置の offset をバイト数で
返します。
offset とは、
Psych::SyntaxError#line, Psych::SyntaxError#column
で指示される位置からの相対位置です。
この位置から 0 バイトの位置でエラーが発生することが多いため、
このメ... -
VALUE rb
_ time _ timespec _ new(const struct timespec *ts , int offset) (12446.0) -
引数 ts、offset を元に Time オブジェクトを作成して返します。
...offset を元に Time オブジェクトを作成して返します。
@param ts timespec 構造体のポインタ
@param offset 協定世界時との時差(秒)。
-86400 < offset < 86400 の場合は指定した時差に、INT_MAX
を指定した場合は地方時、I......NT_MAX-1 を指定した場合は UTC に
なります。
@raise ArgumentError offset に上述の範囲以外の値を指定した場合に発生し
ます。... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (9477.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部......分文字列または正規表現で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではあり......tring#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex("ing", -1)... -
String
# byteindex(pattern , offset = 0) -> Integer | nil (9465.0) -
文字列の offset から右に向かって pattern を検索し、 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...文字列の offset から右に向かって pattern を検索し、
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定......aram offset 探索を開始するバイト単位のオフセット
@raise IndexError オフセットが文字列の境界以外をさしているときに発生します。
//emlist[例][ruby]{
'foo'.byteindex('f') # => 0
'foo'.byteindex('o') # => 1
'foo'.byteindex('oo') # => 1
'foo'.byteindex......=> nil
'foo'.byteindex(/f/) # => 0
'foo'.byteindex(/o/) # => 1
'foo'.byteindex(/oo/) # => 1
'foo'.byteindex(/ooo/) # => nil
'foo'.byteindex('o', 1) # => 1
'foo'.byteindex('o', 2) # => 2
'foo'.byteindex('o', 3) # => nil
'foo'.byteindex('o', -1) # => 2
'foo'.byteindex('o', -2) # => 1
'foo'.byteinde... -
DateTime
# new _ offset(offset = 0) -> DateTime (9408.0) -
self を複製して、その時差を設定しなおします。 引数を省略した場合は、零 (協定世界時) になります。
...self を複製して、その時差を設定しなおします。
引数を省略した場合は、零 (協定世界時) になります。
DateTime.new も参照してください。
@param offset 時差... -
Time
# localtime(utc _ offset) -> self (9343.0) -
タイムゾーンを地方時に設定します。
...utc_offset タイムゾーンを地方時に設定する代わりに協定世界時との
時差を、秒を単位とする整数か、"+HH:MM" "-HH:MM" 形式
の文字列で指定します。
Time#localtime, Time#gmtime の挙動はシステムの
localtime(3)......存します。Time クラ
スでは時刻を起算時からの経過秒数として保持していますが、ある特定の
時刻までの経過秒は、システムがうるう秒を勘定するかどうかによって異
なる場合があります。システムを越えて Time オブジェ......。
//emlist[][ruby]{
p t = Time.utc(2000, "jan", 1, 20, 15, 1) # => 2000-01-01 20:15:01 UTC
p t.utc? # => true
p t.localtime # => 2000-01-02 05:15:01 +0900
p t.utc? # => false
p t.localtime("+09:00")... -
Time
# gmt _ offset -> Integer (9314.0) -
協定世界時との時差を秒を単位とする数値として返します。
...//emlist[地方時の場合][ruby]{
p Time.now.zone # => "JST"
p Time.now.utc_offset # => 32400
//}
タイムゾーンが協定世界時に設定されている場合は 0 を返します。
//emlist[協定世界時の場合][ruby]{
p Time.now.getgm.zone # => "UTC"
p Time.now.getg... -
Time
# utc _ offset -> Integer (9314.0) -
協定世界時との時差を秒を単位とする数値として返します。
...//emlist[地方時の場合][ruby]{
p Time.now.zone # => "JST"
p Time.now.utc_offset # => 32400
//}
タイムゾーンが協定世界時に設定されている場合は 0 を返します。
//emlist[協定世界時の場合][ruby]{
p Time.now.getgm.zone # => "UTC"
p Time.now.getg...