るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. rexml end_element

ライブラリ

クラス

キーワード

検索結果

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

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

...

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

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

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

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

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

self の末尾から破壊的に 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 Strin...
...g#delete_prefix!
@
see String#delete_suffix
@
see String#end_with?...

String#end_with?(*strs) -> bool (6156.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!...