diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-07-30 12:38:04 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-07-31 09:13:20 -0400 |
| commit | ff6a8e95b73f84fafbe4b6cfa4cd73607fb17362 (patch) | |
| tree | 4c2ef181ad3f511bce8599a22d6e744603c0449f /doc | |
| parent | e2bd36388f713e515266381e99f9a54e03b2f32e (diff) | |
[DOc] Tweaks for String#end_with?
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/string/end_with_p.rdoc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/doc/string/end_with_p.rdoc b/doc/string/end_with_p.rdoc index f959cf7aaa..fcd9242122 100644 --- a/doc/string/end_with_p.rdoc +++ b/doc/string/end_with_p.rdoc @@ -1,11 +1,10 @@ -Returns whether +self+ ends with any of the given +strings+. +Returns whether +self+ ends with any of the given +strings+: -Returns +true+ if any given string matches the end, +false+ otherwise: + 'foo'.end_with?('oo') # => true + 'foo'.end_with?('bar', 'oo') # => true + 'foo'.end_with?('bar', 'baz') # => false + 'foo'.end_with?('') # => true + 'тест'.end_with?('т') # => true + 'こんにちは'.end_with?('は') # => true - 'hello'.end_with?('ello') #=> true - 'hello'.end_with?('heaven', 'ello') #=> true - 'hello'.end_with?('heaven', 'paradise') #=> false - 'тест'.end_with?('т') # => true - 'こんにちは'.end_with?('は') # => true - -Related: String#start_with?. +Related: see {Querying}[rdoc-ref:String@Querying]. |
