るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

クラス

キーワード

検索結果

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

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

...列のコピーを返します。

@param suffix 末尾から削除する文字列を指定します。

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

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

@see String#c...
...homp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?...

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

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

...的に suffix を削除します。

@param 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#end_with?(*strs) -> bool (119.0)

self の末尾が strs のいずれかであるとき true を返します。

...@param strs パターンを表す文字列 (のリスト)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

絞り込み条件を変える