@Singleton public class StringUdfSource extends Object implements UdfSourceAssembly
import 'net.hasor.dataql.fx.basic.StringUdfSource' as string;UdfSourceAssembly.TypeUdfMap, UdfSourceAssembly.UdfName, UdfSourceAssembly.UdfParams| 构造器和说明 |
|---|
StringUdfSource() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
alignCenter(String str,
String padChar,
int len)
字符串在指定长度下进行剧中对齐,空出来的字符使用padChar补齐。
|
static String |
alignLeft(String str,
String padChar,
int len)
字符串在指定长度下进行左对齐,空出来的字符使用padChar补齐。
|
static String |
alignRight(String str,
String padChar,
int len)
字符串在指定长度下进行右对齐,空出来的字符使用padChar补齐。
|
static boolean |
contains(String str,
String searchStr)
Checks if String contains a search String, handling
null. |
static boolean |
containsAny(String str,
List<String> searchStrArray)
Checks if the String contains any character in the given set of string.
|
static boolean |
containsAnyIgnoreCase(String str,
List<String> searchStrArray)
Case in-sensitive Checks if the String contains any character in the given set of string.
|
static boolean |
containsIgnoreCase(String str,
String searchStr)
Checks if String contains a search String irrespective of case, handling
null. |
static boolean |
endsWith(String str,
String suffix)
Case insensitive check if a String ends with a specified suffix.
|
static boolean |
endsWithIgnoreCase(String str,
String suffix)
Case insensitive check if a String ends with a specified suffix.
|
static boolean |
equalsIgnoreCase(String str1,
String str2)
忽略大小写比较相等
|
static String |
firstCharToLowerCase(String value)
转换首字母小写
|
static String |
firstCharToUpperCase(String value)
转换首字母大写
|
static String |
humpToLine(String str)
驼峰转下划线
|
static int |
indexOf(String str,
String searchStr)
Finds the first index within a String, handling
null. |
static int |
indexOfIgnoreCase(String str,
String searchStr)
Case in-sensitive find of the first index within a String.
|
static int |
indexOfIgnoreCaseWithStart(String str,
String searchStr,
int startPos)
Case in-sensitive find of the first index within a String from the specified position.
|
static int |
indexOfWithStart(String str,
String searchStr,
int startPos)
Finds the first index within a String from a start position, handling
null. |
static boolean |
isEmpty(String str)
Checks if a String is empty ("") or null.
|
static String |
join(List<Object> array,
String separator)
Joins the elements of the provided array into a single String containing the provided list of elements.
|
static int |
lastIndexOf(String str,
String searchStr)
Finds the last index within a String, handling
null. |
static int |
lastIndexOfIgnoreCase(String str,
String searchStr)
Case in-sensitive find of the last index within a String from the specified position.
|
static int |
lastIndexOfIgnoreCaseWithStart(String str,
String searchStr,
int startPos)
Case in-sensitive find of the last index within a String from the specified position.
|
static int |
lastIndexOfWithStart(String str,
String searchChar,
int startPos)
Finds the last index within a String from a start position, handling
null. |
static String |
left(String str,
int len)
Gets the leftmost
len characters of a String. |
static String |
lineToHump(String str)
下划线转驼峰
|
static String |
right(String str,
int len)
Gets the rightmost
len characters of a String. |
static boolean |
startsWith(String str,
String prefix)
Check if a String starts with a specified prefix.
|
static boolean |
startsWithIgnoreCase(String str,
String prefix)
Case insensitive check if a String starts with a specified prefix.
|
static String |
sub(String str,
int start,
int end)
Gets a substring from the specified String avoiding exceptions.
|
static String |
toLowerCase(String value)
转换小写
|
static String |
toUpperCase(String value)
转换大写
|
static String |
trim(String str)
截断两边空格,如果为空返回为空。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPredicate, getSupplier, getUdfResourcepublic static boolean startsWith(String str, String prefix)
public static boolean startsWithIgnoreCase(String str, String prefix)
public static boolean endsWith(String str, String suffix)
public static boolean endsWithIgnoreCase(String str, String suffix)
public static int indexOf(String str, String searchStr)
null. This method uses String.indexOf(String).public static int indexOfWithStart(String str, String searchStr, int startPos)
null. This method uses String.indexOf(String, int).public static int indexOfIgnoreCase(String str, String searchStr)
public static int indexOfIgnoreCaseWithStart(String str, String searchStr, int startPos)
public static int lastIndexOf(String str, String searchStr)
null. This method uses String.lastIndexOf(String).public static int lastIndexOfWithStart(String str, String searchChar, int startPos)
null. This method uses String.lastIndexOf(String, int).public static int lastIndexOfIgnoreCase(String str, String searchStr)
public static int lastIndexOfIgnoreCaseWithStart(String str, String searchStr, int startPos)
public static boolean contains(String str, String searchStr)
null. This method uses String.indexOf(String).public static boolean containsIgnoreCase(String str, String searchStr)
null. Case-insensitivity is defined as by String.equalsIgnoreCase(String).public static boolean containsAny(String str, List<String> searchStrArray)
public static boolean containsAnyIgnoreCase(String str, List<String> searchStrArray)
public static String sub(String str, int start, int end)
public static String right(String str, int len)
len characters of a String.public static String alignRight(String str, String padChar, int len)
public static String alignLeft(String str, String padChar, int len)
public static String alignCenter(String str, String padChar, int len)
public static String join(List<Object> array, String separator)
public static boolean isEmpty(String str)
Copyright © 2020. All rights reserved.