You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
externalsubstring : t -> from:int -> len:int -> t="substring" [@@bs.send]
207
+
externalsubstr : t -> from:int -> len:int -> t="substr" [@@bs.send]
208
208
209
209
(**
210
-
[substringToEnd str ~from: n] returns the substring of [str] from position [n] to the end of the string.
210
+
[substrToEnd str ~from: n] returns the substring of [str] from position [n] to the end of the string.
211
211
212
212
If [n] is less than zero, the starting position is the length of [str] - [n].
213
213
214
214
If [n] is greater than or equal to the length of [str], returns the empty string.
215
215
216
216
@example {[
217
-
substringToEnd "abcdefghij" ~from: 3 = "defghij"
218
-
substringToEnd "abcdefghij" ~from: (-3) = "hij"
219
-
substringToEnd "abcdefghij" ~from: 12 = ""
217
+
substrToEnd "abcdefghij" ~from: 3 = "defghij"
218
+
substrToEnd "abcdefghij" ~from: (-3) = "hij"
219
+
substrToEnd "abcdefghij" ~from: 12 = ""
220
220
]}
221
221
*)
222
-
externalsubstringToEnd : t -> from:int -> t="substring" [@@bs.send]
222
+
externalsubstrToEnd : t -> from:int -> t="substr" [@@bs.send]
223
223
224
224
(** [slice from:n1 to_:n2 str] returns the substring of [str] starting at character [n1] up to but not including [n2]
225
225
@@ -250,7 +250,7 @@ If [n] is greater than the length of [str], then [sliceToEnd] returns the empty
250
250
sliceToEnd "abcdefg" ~from: 7 == "";;
251
251
]}
252
252
*)
253
-
externalsliceToEnd : t -> from:int="slice" [@@bs.send]
253
+
externalsliceToEnd : t -> from:int-> t="slice" [@@bs.send]
254
254
255
255
(**
256
256
[trim str] returns a string that is [str] with whitespace stripped from both ends. Internal whitespace is not removed.
@@ -291,7 +291,7 @@ external trimEnd : t -> t = "trimEnd" [@@bs.send] (** ES2015 *)
291
291
padStart "444" 3 "0" = "444"
292
292
]}
293
293
*)
294
-
externalpadStart : t -> t="padStart" [@@bs.send] (** ES2015 *)
294
+
externalpadStart : t -> int -> t -> t="padStart" [@@bs.send] (** ES2015 *)
295
295
296
296
(**
297
297
[padEnd str int padStr] returns a string that is [str] padded to the right with padStr.
@@ -301,7 +301,7 @@ external padStart : t -> t = "padStart" [@@bs.send] (** ES2015 *)
301
301
padEnd "444" 3 "0" = "444"
302
302
]}
303
303
*)
304
-
externalpadEnd : t -> t="padEnd" [@@bs.send] (** ES2015 *)
304
+
externalpadEnd : t -> int -> t -> t="padEnd" [@@bs.send] (** ES2015 *)
305
305
306
306
(**
307
307
[toLowerCase str] converts [str] to lower case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can give different results depending upon context, for example with the Greek letter sigma, which has two different lower case forms when it is the last character in a string or not.
0 commit comments