Class StringFunctions
- java.lang.Object
-
- org.apache.flink.cdc.runtime.functions.impl.StringFunctions
-
public class StringFunctions extends Object
String built-in functions.
-
-
Constructor Summary
Constructors Constructor Description StringFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringbtrim(String str)static Stringbtrim(String str, String trimStr)static intcharLength(String str)static Stringconcat(String... str)static StringconcatWs(String separator, String... str)static Booleanendswith(byte[] bytes, byte[] suffix)static Booleanendswith(String str, String suffix)static StringfromBase64(String str)static byte[]fromBase64Binary(String str)static Integerinstr(String str, String subString)static Stringleft(String str, Number length)static booleanlike(String str, String regex)static Booleanlike(String str, String pattern, String escape)static Integerlocate(String seek, String str)static Integerlocate(String seek, String str, Number from)static Stringlower(String str)static Stringlpad(String base, Number len, String pad)static Stringltrim(String str)static Stringltrim(String str, String trimStr)static booleannotLike(String str, String regex)static BooleannotLike(String str, String pattern, String escape)static BooleannotSimilarTo(String str, String pattern)static BooleannotSimilarTo(String str, String pattern, String escape)static byte[]overlay(byte[] bytes, byte[] replacement, Number start)static byte[]overlay(byte[] bytes, byte[] replacement, Number start, Number length)static Stringoverlay(String str, String replacement, Number start)static Stringoverlay(String str, String replacement, Number start, Number length)static VariantparseJson(String jsonStr)static VariantparseJson(String jsonStr, boolean allowDuplicateKeys)static Integerposition(byte[] seek, byte[] bytes)static Integerposition(byte[] seek, byte[] bytes, Number from)static Integerposition(String seek, String str)static Integerposition(String seek, String str, Number from)static IntegerregexpCount(String str, String regex)Returns the number of non-overlapping matches of a regular expression.static StringregexpExtract(String str, String regex)Returns a string extracted with a specified regular expression and capture group index.static StringregexpExtract(String str, String regex, Number extractIndex)static List<String>regexpExtractAll(String str, String regex)Returns all strings extracted with a specified regular expression.static List<String>regexpExtractAll(String str, String regex, Number extractIndex)static IntegerregexpInstr(String str, String regex)Returns the 1-based position of the first regular expression match.static StringregexpReplace(String str, String regex, String replacement)Returns a string resulting from replacing all substrings that match the regular expression with replacement.static StringregexpSubstr(String str, String regex)Returns the first substring that matches a regular expression.static Stringrepeat(String str, Number repeat)static Stringreplace(String str, String oldStr, String replacement)static Stringright(String str, Number length)static Stringrpad(String base, Number len, String pad)static Stringrtrim(String str)static Stringrtrim(String str, String trimStr)static BooleansimilarTo(String str, String pattern)static BooleansimilarTo(String str, String pattern, String escape)static Booleanstartswith(byte[] bytes, byte[] prefix)static Booleanstartswith(String str, String prefix)static Stringsubstr(String str, int beginIndex)static Stringsubstr(String str, int beginIndex, int length)static Stringsubstring(String str, int beginIndex)static Stringsubstring(String str, int beginIndex, int length)static StringtoBase64(byte[] bytes)static StringtoBase64(String str)static Stringtrim(String symbol, String target, String str)static VarianttryParseJson(String jsonStr)static VarianttryParseJson(String jsonStr, boolean allowDuplicateKeys)static Stringupper(String str)static Stringuuid()static Stringuuid(byte[] b)
-
-
-
Method Detail
-
charLength
public static int charLength(String str)
-
regexpReplace
public static String regexpReplace(String str, String regex, String replacement)
Returns a string resulting from replacing all substrings that match the regular expression with replacement.
-
regexpExtract
public static String regexpExtract(String str, String regex)
Returns a string extracted with a specified regular expression and capture group index.
-
regexpExtractAll
public static List<String> regexpExtractAll(String str, String regex)
Returns all strings extracted with a specified regular expression.
-
regexpExtractAll
public static List<String> regexpExtractAll(String str, String regex, Number extractIndex)
-
regexpCount
public static Integer regexpCount(String str, String regex)
Returns the number of non-overlapping matches of a regular expression.
-
regexpInstr
public static Integer regexpInstr(String str, String regex)
Returns the 1-based position of the first regular expression match.
-
regexpSubstr
public static String regexpSubstr(String str, String regex)
Returns the first substring that matches a regular expression.
-
overlay
public static byte[] overlay(byte[] bytes, byte[] replacement, Number start)
-
overlay
public static byte[] overlay(byte[] bytes, byte[] replacement, Number start, Number length)
-
position
public static Integer position(byte[] seek, byte[] bytes)
-
startswith
public static Boolean startswith(byte[] bytes, byte[] prefix)
-
endswith
public static Boolean endswith(byte[] bytes, byte[] suffix)
-
toBase64
public static String toBase64(byte[] bytes)
-
fromBase64Binary
public static byte[] fromBase64Binary(String str)
-
uuid
public static String uuid()
-
uuid
public static String uuid(byte[] b)
-
-