るりまサーチ

最速Rubyリファレンスマニュアル検索!
322件ヒット [301-322件を表示] (0.048秒)

別のキーワード

  1. range max
  2. range min
  3. net/http set_range
  4. httpheader set_range
  5. range step

キーワード

検索結果

<< < ... 2 3 4 >>

String#byteslice(nth) -> String | nil (8.0)

nth バイト目の文字を返します。nth が負の場合は文字列の末尾から数えます。 引数が範囲外を指定した場合は nil を返します。

...rn 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。

//emlist[例][ruby]{
"hello".byteslice(1) # => "e"
"hello".byteslice(-1) # => "o"
"\u3042".byteslice(0) # => "\xE3"
"\u3042".byteslice(1) # => "\x81"
//}

@see String#slice...

String#byteslice(nth, len=1) -> String | nil (8.0)

nth バイト目から長さ len バイトの部分文字列を新しく作って返します。 nth が負の場合は文字列の末尾から数えます。引数が範囲外を指定した場合は nil を返します。

...数で指定します。

@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。

//emlist[例][ruby]{
"hello".byteslice(1, 2) # => "el"
"\u3042\u3044\u3046".byteslice(0, 3) # => "\u3042"
//}

@see String#slice...
...

@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。

//emlist[例][ruby]{
"hello".byteslice(1, 2) # => "el"
"\u3042\u3044\u3046".byteslice(0, 3) # => "\u3042"
//}

@see String#slice
@see String#bytesplice...
<< < ... 2 3 4 >>