1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-23 01:24:30 +02:00
ferret/pkg/stdlib/strings/lib.go
Tim Voronov 376ad77404
Feature/#250 wait style (#255)
* Added support for parsed styles

* Added stdlib function.

* Added e2e tests

* Added e2e tests for STYLE_* functions
2019-03-13 14:51:30 -04:00

39 lines
1.2 KiB
Go

package strings
import "github.com/MontFerret/ferret/pkg/runtime/core"
func NewLib() map[string]core.Function {
return map[string]core.Function{
"CONCAT": Concat,
"CONCAT_SEPARATOR": ConcatWithSeparator,
"CONTAINS": Contains,
"ENCODE_URI_COMPONENT": EncodeURIComponent,
"FIND_FIRST": FindFirst,
"FIND_LAST": FindLast,
"JSON_PARSE": JSONParse,
"JSON_STRINGIFY": JSONStringify,
"LEFT": Left,
"LIKE": Like,
"LOWER": Lower,
"LTRIM": LTrim,
"RANDOM_TOKEN": RandomToken,
"MD5": Md5,
"REGEXP_MATCH": RegexMatch,
"REGEXP_SPLIT": RegexSplit,
"REGEXP_TEST": RegexTest,
"REGEXP_REPLACE": RegexReplace,
"RIGHT": Right,
"RTRIM": RTrim,
"SHA1": Sha1,
"SHA512": Sha512,
"SPLIT": Split,
"SUBSTITUTE": Substitute,
"SUBSTRING": Substring,
"TO_BASE64": ToBase64,
"FROM_BASE64": FromBase64,
"TRIM": Trim,
"UPPER": Upper,
"FMT": Fmt,
}
}