File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
extensions/src/main/java/dev/cel/extensions Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -474,6 +474,19 @@ Examples:
474474 'TacoCat'.lowerAscii() // returns 'tacocat'
475475 'TacoCÆt Xii'.lowerAscii() // returns 'tacocÆt xii'
476476
477+ ### Quote
478+
479+ Takes the given string and makes it safe to print (without any formatting due
480+ to escape sequences).
481+ If any invalid UTF-8 characters are encountered, they are replaced with \uFFFD.
482+
483+ strings.quote(<string>)
484+
485+ Examples:
486+
487+ strings.quote('single-quote with "double quote"') // returns '"single-quote with \"double quote\""'
488+ strings.quote("two escape sequences \a\n") // returns '"two escape sequences \\a\\n"'
489+
477490### Replace
478491
479492Returns a new string based on the target, which replaces the occurrences of a
@@ -493,6 +506,20 @@ Examples:
493506 'hello hello'.replace('he', 'we', 1) // returns 'wello hello'
494507 'hello hello'.replace('he', 'we', 0) // returns 'hello hello'
495508
509+ ### Reverse
510+
511+ Returns a new string whose characters are the same as the target string, only
512+ formatted in reverse order.
513+ This function relies on converting strings to Unicode code point arrays in
514+ order to reverse.
515+
516+ <string>.reverse() -> <string>
517+
518+ Examples:
519+
520+ 'gums'.reverse() // returns 'smug'
521+ 'John Smith'.reverse() // returns 'htimS nhoJ'
522+
496523### Split
497524
498525Returns a mutable list of strings split from the input by the given separator. The
You can’t perform that action at this time.
0 commit comments