Skip to content

Commit 6792e50

Browse files
authored
Merge pull request #2533 from bobrippling/types/startsWith
Make optional string method arguments optional
2 parents 717a527 + 04849dc commit 6792e50

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/jswrap_string.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ JsVar *jswrap_string_charCodeAt(JsVar *parent, JsVarInt idx) {
163163
"generate_full" : "jswrap_string_indexOf(parent, substring, fromIndex, false)",
164164
"params" : [
165165
["substring","JsVar","The string to search for"],
166-
["fromIndex","JsVar","Index to search from"]
166+
["fromIndex","JsVar","[optional] Index to search from"]
167167
],
168168
"return" : ["int32","The index of the string, or -1 if not found"]
169169
}
@@ -176,7 +176,7 @@ Return the index of substring in this string, or -1 if not found
176176
"generate_full" : "jswrap_string_indexOf(parent, substring, fromIndex, true)",
177177
"params" : [
178178
["substring","JsVar","The string to search for"],
179-
["fromIndex","JsVar","Index to search from"]
179+
["fromIndex","JsVar","[optional] Index to search from"]
180180
],
181181
"return" : ["int32","The index of the string, or -1 if not found"]
182182
}
@@ -461,7 +461,7 @@ JsVar *jswrap_string_replaceAll(JsVar *parent, JsVar *subStr, JsVar *newSubStr)
461461
"generate" : "jswrap_string_substring",
462462
"params" : [
463463
["start","int","The start character index (inclusive)"],
464-
["end","JsVar","The end character index (exclusive)"]
464+
["end","JsVar","[optional] The end character index (exclusive)"]
465465
],
466466
"return" : ["JsVar","The part of this string between start and end"]
467467
}*/
@@ -484,7 +484,7 @@ JsVar *jswrap_string_substring(JsVar *parent, JsVarInt pStart, JsVar *vEnd) {
484484
"generate" : "jswrap_string_substr",
485485
"params" : [
486486
["start","int","The start character index"],
487-
["len","JsVar","The number of characters"]
487+
["len","JsVar","[optional] The number of characters"]
488488
],
489489
"return" : ["JsVar","Part of this string from start for len characters"]
490490
}*/
@@ -798,7 +798,7 @@ JsVar *jswrap_string_concat(JsVar *parent, JsVar *args) {
798798
"generate" : "jswrap_string_startsWith",
799799
"params" : [
800800
["searchString","JsVar","The string to search for"],
801-
["position","int","The start character index (or 0 if not defined)"]
801+
["position","int","[optional] The start character index (or 0 if not defined)"]
802802
],
803803
"return" : ["bool","`true` if the given characters are found at the beginning of the string, otherwise, `false`."]
804804
}
@@ -822,7 +822,7 @@ bool jswrap_string_startsWith(JsVar *parent, JsVar *search, int position) {
822822
"generate" : "jswrap_string_endsWith",
823823
"params" : [
824824
["searchString","JsVar","The string to search for"],
825-
["length","JsVar","The 'end' of the string - if left off the actual length of the string is used"]
825+
["length","JsVar","[optional] The 'end' of the string - if left off the actual length of the string is used"]
826826
],
827827
"return" : ["bool","`true` if the given characters are found at the end of the string, otherwise, `false`."]
828828
}
@@ -848,7 +848,7 @@ bool jswrap_string_endsWith(JsVar *parent, JsVar *search, JsVar *length) {
848848
"generate_full" : "jswrap_string_indexOf(parent, substring, fromIndex, false)>=0",
849849
"params" : [
850850
["substring","JsVar","The string to search for"],
851-
["fromIndex","JsVar","The start character index (or 0 if not defined)"]
851+
["fromIndex","JsVar","[optional] The start character index (or 0 if not defined)"]
852852
],
853853
"return" : ["bool","`true` if the given characters are in the string, otherwise, `false`."]
854854
}

0 commit comments

Comments
 (0)