-
- All Implemented Interfaces:
public final class CaseFormatExtensions
-
-
Method Summary
Modifier and Type Method Description final static CaseFormatinferCase(String $self)尝试推断当前字符串的字母格式。 final static BooleanmatchesBy(String $self, CaseFormat caseFormat)判断当前字符串是否匹配指定的字母格式。 final static List<String>splitBy(String $self, CaseFormat caseFormat)根据指定的字母格式,分割当前字符串,返回对应的字符串列表。 final static Sequence<String>splitToSequenceBy(String $self, CaseFormat caseFormat)根据指定的字母格式,分割当前字符串,返回对应的字符串序列。 final static StringjoinToStringBy(Array<String> $self, CaseFormat caseFormat)根据指定的字母格式,将当前字符串数组中的元素加入到字符串。 final static StringjoinToStringBy(Iterable<String> $self, CaseFormat caseFormat)根据指定的字母格式,将当前字符串集合中的元素加入到字符串。 final static StringjoinToStringBy(Sequence<String> $self, CaseFormat caseFormat)根据指定的字母格式,将当前字符串序列中的元素加入到字符串。 final static StringswitchCaseBy(String $self, CaseFormat sourceCaseFormat, CaseFormat targetCaseFormat)根据指定的字母格式,切换当前字符串的格式。 final static StringswitchCaseBy(String $self, CaseFormat targetCaseFormat)根据指定的字母格式,切换当前字符串的格式。如果不指定字母格式,则尝试推断或者抛出异常。 -
-
Method Detail
-
inferCase
final static CaseFormat inferCase(String $self)
尝试推断当前字符串的字母格式。
-
matchesBy
final static Boolean matchesBy(String $self, CaseFormat caseFormat)
判断当前字符串是否匹配指定的字母格式。
-
splitBy
final static List<String> splitBy(String $self, CaseFormat caseFormat)
根据指定的字母格式,分割当前字符串,返回对应的字符串列表。
-
splitToSequenceBy
final static Sequence<String> splitToSequenceBy(String $self, CaseFormat caseFormat)
根据指定的字母格式,分割当前字符串,返回对应的字符串序列。
-
joinToStringBy
final static String joinToStringBy(Array<String> $self, CaseFormat caseFormat)
根据指定的字母格式,将当前字符串数组中的元素加入到字符串。
-
joinToStringBy
final static String joinToStringBy(Iterable<String> $self, CaseFormat caseFormat)
根据指定的字母格式,将当前字符串集合中的元素加入到字符串。
-
joinToStringBy
final static String joinToStringBy(Sequence<String> $self, CaseFormat caseFormat)
根据指定的字母格式,将当前字符串序列中的元素加入到字符串。
-
switchCaseBy
final static String switchCaseBy(String $self, CaseFormat sourceCaseFormat, CaseFormat targetCaseFormat)
根据指定的字母格式,切换当前字符串的格式。
-
switchCaseBy
final static String switchCaseBy(String $self, CaseFormat targetCaseFormat)
根据指定的字母格式,切换当前字符串的格式。如果不指定字母格式,则尝试推断或者抛出异常。
-
-
-
-