diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-10-23 20:53:46 +0100 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-10-23 18:12:42 -0400 |
| commit | 8b0d405337781205412f7eb8fd7d3ae684f3469a (patch) | |
| tree | aade9d05bee41f4ae249ab87c0816bfd59b1d443 /doc | |
| parent | 8de628dc8055e1d812fdf326e4a6f74ce11a283d (diff) | |
[DOC] Tweaks for String#start_with?
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/string/start_with_p.rdoc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/string/start_with_p.rdoc b/doc/string/start_with_p.rdoc index 5d1f9f9543..298a557276 100644 --- a/doc/string/start_with_p.rdoc +++ b/doc/string/start_with_p.rdoc @@ -1,10 +1,9 @@ -Returns whether +self+ starts with any of the given +string_or_regexp+. +Returns whether +self+ starts with any of the given +patterns+. -Matches patterns against the beginning of +self+. -For each given +string_or_regexp+, the pattern is: +For each argument, the pattern used is: -- +string_or_regexp+ itself, if it is a Regexp. -- <tt>Regexp.quote(string_or_regexp)</tt>, if +string_or_regexp+ is a string. +- The pattern itself, if it is a Regexp. +- <tt>Regexp.quote(pattern)</tt>, if it is a string. Returns +true+ if any pattern matches the beginning, +false+ otherwise: @@ -15,4 +14,4 @@ Returns +true+ if any pattern matches the beginning, +false+ otherwise: 'тест'.start_with?('т') # => true 'こんにちは'.start_with?('こ') # => true -Related: String#end_with?. +Related: see {Querying}[rdoc-ref:String@Querying]. |
