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
{{ message }}
This repository was archived by the owner on Mar 16, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: pkg/builtin/functions.go
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,14 +76,15 @@ var (
76
76
"contains?": containsRudiFunction,
77
77
78
78
"concat": functions.NewBuilder(concatFunction).WithDescription("concatenates items in a vector using a common glue string").Build(),
79
-
"split": functions.NewBuilder(splitFunction).WithDescription("splits a string into a vector").Build(),
79
+
"split": functions.NewBuilder(splitFunction, splitnFunction).WithDescription("splits a string into a vector").Build(),
80
80
"has-prefix?": functions.NewBuilder(hasPrefixFunction).WithDescription("returns true if the given string has the prefix").Build(),
81
81
"has-suffix?": functions.NewBuilder(hasSuffixFunction).WithDescription("returns true if the given string has the suffix").Build(),
82
82
"trim-prefix": functions.NewBuilder(trimPrefixFunction).WithDescription("removes the prefix from the string, if it exists").Build(),
83
83
"trim-suffix": functions.NewBuilder(trimSuffixFunction).WithDescription("removes the suffix from the string, if it exists").Build(),
84
84
"to-lower": functions.NewBuilder(toLowerFunction).WithDescription("returns the lowercased version of the given string").Build(),
85
85
"to-upper": functions.NewBuilder(toUpperFunction).WithDescription("returns the uppercased version of the given string").Build(),
86
86
"trim": functions.NewBuilder(trimFunction).WithDescription("returns the given whitespace with leading/trailing whitespace removed").Build(),
87
+
"replace": functions.NewBuilder(replaceAllFunction, replaceLimitFunction).WithDescription("returns a copy of a string with the a substring replaced by another").Build(),
87
88
}
88
89
89
90
ListsFunctions= types.Functions{
@@ -132,6 +133,8 @@ var (
132
133
EncodingFunctions= types.Functions{
133
134
"to-base64": functions.NewBuilder(toBase64Function).WithDescription("apply base64 encoding to the given string").Build(),
134
135
"from-base64": functions.NewBuilder(fromBase64Function).WithDescription("decode a base64 encoded string").Build(),
136
+
"to-json": functions.NewBuilder(toJSONFunction).WithDescription("encode the given value using JSON").Build(),
137
+
"from-json": functions.NewBuilder(fromJSONFunction).WithDescription("decode a JSON string").Build(),
0 commit comments