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
Copy file name to clipboardExpand all lines: src/examples/advanced/stringFnExpressions.ts
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,15 @@ import { Example, ExampleCategory, ExampleInfo } from "../Example"
11
11
* This example shows how to use string functions within expressions.
12
12
*
13
13
* The following string functions are supported:
14
-
* - replace(searchRegexp, replacement)
15
-
* - replaceAll(searchRegexp, replacement)
16
-
* - slice(start, end)
17
-
* - substring(start, end)
18
-
* - trimStart()
19
-
* - trimEnd()
20
-
* - trim()
21
-
* - toUpperCase()
22
-
* - toLowerCase()
14
+
* - `replace(searchRegexp, replacement)`: Replaces the first occurrence of a pattern matching the regular expression with a replacement string. See [`String.prototype.replace()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace).
15
+
* - `replaceAll(searchRegexp, replacement)`: Replaces all occurrences of a pattern matching the regular expression with a replacement string. See [`String.prototype.replaceAll()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll).
16
+
* - `slice(start, end)`: Extracts a section of a string and returns it as a new string, without modifying the original string. See [`String.prototype.slice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice).
17
+
* - `substring(start, end)`: Returns the part of the string between the start and end indexes, or to the end of the string. See [`String.prototype.substring()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring).
18
+
* - `trimStart()`: Removes whitespace from the beginning of a string. See [`String.prototype.trimStart()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart).
19
+
* - `trimEnd()`: Removes whitespace from the end of a string. See [`String.prototype.trimEnd()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd).
20
+
* - `trim()`: Removes whitespace from both ends of a string. See [`String.prototype.trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim).
21
+
* - `toUpperCase()`: Converts a string to uppercase letters. See [`String.prototype.toUpperCase()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase).
22
+
* - `toLowerCase()`: Converts a string to lowercase letters. See [`String.prototype.toLowerCase()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase).
Copy file name to clipboardExpand all lines: src/gas/examples/advanced/stringFnExpressions-test.js
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,15 @@ function stringFnExpressionsTestConfig() {
7
7
* This example shows how to use string functions within expressions.
8
8
*
9
9
* The following string functions are supported:
10
-
* - replace(searchRegexp, replacement)
11
-
* - replaceAll(searchRegexp, replacement)
12
-
* - slice(start, end)
13
-
* - substring(start, end)
14
-
* - trimStart()
15
-
* - trimEnd()
16
-
* - trim()
17
-
* - toUpperCase()
18
-
* - toLowerCase()
10
+
* - `replace(searchRegexp, replacement)`: Replaces the first occurrence of a pattern matching the regular expression with a replacement string. See [`String.prototype.replace()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace).
11
+
* - `replaceAll(searchRegexp, replacement)`: Replaces all occurrences of a pattern matching the regular expression with a replacement string. See [`String.prototype.replaceAll()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll).
12
+
* - `slice(start, end)`: Extracts a section of a string and returns it as a new string, without modifying the original string. See [`String.prototype.slice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice).
13
+
* - `substring(start, end)`: Returns the part of the string between the start and end indexes, or to the end of the string. See [`String.prototype.substring()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring).
14
+
* - `trimStart()`: Removes whitespace from the beginning of a string. See [`String.prototype.trimStart()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimStart).
15
+
* - `trimEnd()`: Removes whitespace from the end of a string. See [`String.prototype.trimEnd()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd).
16
+
* - `trim()`: Removes whitespace from both ends of a string. See [`String.prototype.trim()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim).
17
+
* - `toUpperCase()`: Converts a string to uppercase letters. See [`String.prototype.toUpperCase()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase).
18
+
* - `toLowerCase()`: Converts a string to lowercase letters. See [`String.prototype.toLowerCase()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase).
19
19
*/
20
20
constinfo={
21
21
name: "stringFnExpressions",
@@ -24,6 +24,7 @@ function stringFnExpressionsTestConfig() {
24
24
"This example demonstrates how to use string function expressions in the configuration.",
0 commit comments