るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice!
  3. string slice
  4. string []
  5. openssl utf8string

ライブラリ

クラス

検索結果

String#end_with?(*strs) -> bool (54285.0)

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

...strs のいずれかであるとき true を返します。

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

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

@see String#sta...
...rt_with?...
...rt_with?
@see String#delete_suffix, String#delete_suffix!...

Symbol#end_with?(*suffixes) -> bool (24231.0)

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

...とき true を返します。

(self.to_s.end_with?と同じです。)

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

@see Symbol#start_with?

@see String#end_with?

//emlist[][ruby]{
:hello.end_with?("ello") #=> true

# returns true if one of the +suffixes+ matches....
...:hello.end_with?("heaven", "ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}...