るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.042秒)
トップページ > クラス:String[x] > クエリ:_builtin[x] > クエリ:delete[x] > クエリ:delete_prefix[x] > バージョン:2.5.0[x]

別のキーワード

  1. _builtin delete
  2. _builtin delete_if
  3. cgi delete
  4. net/pop delete_all
  5. cgi/session delete

ライブラリ

キーワード

検索結果

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

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

...する文字列を指定します。

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

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

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

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

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

...ら削除する文字列を指定します。

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

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

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

String#delete_suffix!(suffix) -> self | nil (42397.0)

self の末尾から破壊的に suffix を削除します。

...ます。

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

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

@see String#chomp!
@see String#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see String#end_with?...

String#delete_suffix(suffix) -> String (42397.0)

文字列の末尾から suffix を削除した文字列のコピーを返します。

...

@return 文字列の末尾から suffix を削除した文字列のコピー

//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("hel") # => "hello"
//}

@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?...

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

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

..."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#d...

絞り込み条件を変える