るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. rsa p

ライブラリ

キーワード

検索結果

String#start_with?(*prefixes) -> bool (6233.0)

self の先頭が prefixes のいずれかであるとき true を返します。

...先頭が prefixes のいずれかであるとき true を返します。

@param prefixes パターンを表す文字列または正規表現 (のリスト)

//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing...
...", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}

@see String#end_with?
@see String#delete_prefix, String#delete_prefix!...

String#delete_prefix!(prefix) -> self | nil (6208.0)

self の先頭から破壊的に prefix を削除します。

... prefix を削除します。

@param prefix 先頭から削除する文字列を指定します。

@return 削除した場合は self、変化しなかった場合は nil

//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}

@see String#delete_prefi...
...x
@see String#delete_suffix!
@see String#start_with?...

String#delete_prefix(prefix) -> String (6208.0)

文字列の先頭から prefix を削除した文字列のコピーを返します。

...から prefix を削除した文字列のコピーを返します。

@param prefix 先頭から削除する文字列を指定します。

@return 文字列の先頭から prefix を削除した文字列のコピー

//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("ll...
...o") # => "hello"
//}

@see String#delete_prefix!
@see String#delete_suffix
@see String#start_with?...