Skip to content

Commit 8b0d405

Browse files
BurdetteLamarpeterzhu2118
authored andcommitted
[DOC] Tweaks for String#start_with?
1 parent 8de628d commit 8b0d405

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

doc/string/start_with_p.rdoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
Returns whether +self+ starts with any of the given +string_or_regexp+.
1+
Returns whether +self+ starts with any of the given +patterns+.
22

3-
Matches patterns against the beginning of +self+.
4-
For each given +string_or_regexp+, the pattern is:
3+
For each argument, the pattern used is:
54

6-
- +string_or_regexp+ itself, if it is a Regexp.
7-
- <tt>Regexp.quote(string_or_regexp)</tt>, if +string_or_regexp+ is a string.
5+
- The pattern itself, if it is a Regexp.
6+
- <tt>Regexp.quote(pattern)</tt>, if it is a string.
87

98
Returns +true+ if any pattern matches the beginning, +false+ otherwise:
109

@@ -15,4 +14,4 @@ Returns +true+ if any pattern matches the beginning, +false+ otherwise:
1514
'тест'.start_with?('т') # => true
1615
'こんにちは'.start_with?('こ') # => true
1716

18-
Related: String#end_with?.
17+
Related: see {Querying}[rdoc-ref:String@Querying].

string.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11214,7 +11214,7 @@ rb_str_rpartition(VALUE str, VALUE sep)
1121411214

1121511215
/*
1121611216
* call-seq:
11217-
* start_with?(*string_or_regexp) -> true or false
11217+
* start_with?(*patterns) -> true or false
1121811218
*
1121911219
* :include: doc/string/start_with_p.rdoc
1122011220
*

0 commit comments

Comments
 (0)