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
Returns a string containing the characters in the first parameter `str` starting at position `start` (zero-offset). If `str` is not specified (i.e. this function is invoked with only the numeric argument(s)), then the context value is used as the value of `str`. An error is thrown if `str` is not a string.
37
39
38
-
If `length` is specified, then the substring will contain maximum `length` characters.
40
+
If `length` is specified, then the substring will contain maximum `length` characters.
39
41
40
42
If `start` is negative then it indicates the number of characters from the end of `str`. See [substr](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) for full definition.
41
43
42
44
__Examples__
43
45
44
-
-`$substring("Hello World", 3)` => `"lo World"`
45
-
-`$substring("Hello World", 3, 5)` => `"lo Wo"`
46
-
-`$substring("Hello World", -4)` => `"orld"`
46
+
-`$substring("Hello World", 3)` => `"lo World"`
47
+
-`$substring("Hello World", 3, 5)` => `"lo Wo"`
48
+
-`$substring("Hello World", -4)` => `"orld"`
47
49
-`$substring("Hello World", -4, 2)` => `"or"`
48
50
49
51
## `$substringBefore()`
@@ -122,26 +124,26 @@ The `pattern` parameter can either be a string or a regular expression (regex).
Splits the `str` parameter into an array of substrings. If `str` is not specified, then the context value is used as the value of `str`. It is an error if `str` is not a string.
137
+
Splits the `str` parameter into an array of substrings. If `str` is not specified, then the context value is used as the value of `str`. It is an error if `str` is not a string.
136
138
137
139
The `separator` parameter can either be a string or a regular expression (regex). If it is a string, it specifies the characters within `str` about which it should be split. If it is the empty string, `str` will be split into an array of single characters. If it is a regex, it splits the string around any sequence of characters that match the regex.
138
140
139
141
The optional `limit` parameter is a number that specifies the maximum number of substrings to include in the resultant array. Any additional substrings are discarded. If `limit` is not specified, then `str` is fully split with no limit to the size of the resultant array. It is an error if `limit` is not a non-negative number.
Converts an ASCII string to a base 64 representation. Each each character in the string is treated as a byte of binary data. This requires that all characters in the string are in the 0x00 to 0xFF range, which includes all characters in URI encoded strings. Unicode characters outside of that range are not supported.
0 commit comments