@PSOperatorWrapper public class StringOperators extends java.lang.Object
Constructor and Description |
---|
StringOperators() |
Modifier and Type | Method and Description |
---|---|
static Function<Item,java.lang.Boolean> |
contains(java.lang.String stringField,
java.lang.String searchString)
Check whether the string value of a field contains a certain substring.
|
static Function<Item,java.lang.String> |
elide(java.lang.String stringField,
int start,
int end)
Elide a substring in the string value of a field.
|
static Function<Item,java.lang.Integer> |
indexOf(java.lang.String stringField,
java.lang.String searchString)
Get the index of a substring in the string value of a field.
|
static Function<Item,java.lang.Integer> |
length(java.lang.String stringField)
Get the length of the string value of a field.
|
static Function<Item,java.lang.String> |
md5(java.lang.String stringField)
Get the MD5-hashed value of the string value of a field.
|
static Function<Item,java.lang.String> |
replace(java.lang.String stringField,
java.lang.String searchString,
java.lang.String replaceString)
Replace a substring to a new string in the string value of a field.
|
static Function<Item,java.lang.String> |
sha1(java.lang.String stringField)
Get the SHA1-hashed value of the string value of a field.
|
static Function<Item,java.lang.String> |
sha256(java.lang.String stringField)
Get the SHA256-hashed value of the string value of a field.
|
static Function<Item,java.lang.String> |
subString(java.lang.String stringField,
int start,
int end)
Get a substring of the string value of a field.
|
public static Function<Item,java.lang.Boolean> contains(java.lang.String stringField, java.lang.String searchString)
stringField
- the name of the string fieldsearchString
- the substring to searchpublic static Function<Item,java.lang.String> md5(java.lang.String stringField)
stringField
- the name of the string field to perform hash.public static Function<Item,java.lang.String> sha1(java.lang.String stringField)
stringField
- the name of the string field to perform hash.public static Function<Item,java.lang.String> sha256(java.lang.String stringField)
stringField
- the name of the string field to perform hash.public static Function<Item,java.lang.Integer> indexOf(java.lang.String stringField, java.lang.String searchString)
stringField
- the name of the string fieldsearchString
- the substring to searchpublic static Function<Item,java.lang.Integer> length(java.lang.String stringField)
stringField
- the name of the string field to calculate lengthpublic static Function<Item,java.lang.String> replace(java.lang.String stringField, java.lang.String searchString, java.lang.String replaceString)
stringField
- the name of the string fieldsearchString
- the substring to searchreplaceString
- the string used to replace the searchStringpublic static Function<Item,java.lang.String> subString(java.lang.String stringField, int start, int end)
stringField
- the name of the string field to calculate lengthstart
- the position to start from, negative means
count back from the end of the String by this many charactersend
- the position to end at (exclusive), negative means
count back from the end of the String by this many characterspublic static Function<Item,java.lang.String> elide(java.lang.String stringField, int start, int end)
stringField
- the name of the string field to calculate lengthstart
- the position to start from, negative means
count back from the end of the String by this many charactersend
- the position to end at (exclusive), negative means
count back from the end of the String by this many characters