public class StringFunctions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StringFunctions.RegexReplacer |
Constructor and Description |
---|
StringFunctions() |
Modifier and Type | Method and Description |
---|---|
static <any> |
append(java.lang.String suffix) |
static <any> |
convertCase(CaseFormat src,
CaseFormat target) |
static <any> |
formatter(java.lang.String pattern)
given e.g.
|
static <any> |
formatterForArray(java.lang.String pattern)
given e.g.
|
static <any> |
formatterForIterable(java.lang.String pattern)
Given e.g.
|
static <any> |
joiner(java.lang.String separator)
joins the given objects in a collection as a toString with the given separator
|
static <any> |
joinerForArray(java.lang.String separator)
joins the given objects as a toString with the given separator, but expecting an array of objects, not a collection
|
static <any> |
length()
returns function which gives length of input, with -1 for nulls
|
static <any> |
prepend(java.lang.String prefix) |
static <any> |
surround(java.lang.String prefix,
java.lang.String suffix)
Surrounds an input string with the given prefix and suffix
|
static <any> |
toLowerCase() |
static <any> |
toStringFunction()
provided here as a convenience; prefer
Functions#toStringFunction() |
static <any> |
toUpperCase() |
static <any> |
trim() |
static <any> |
trimEnd() |
public static <any> append(java.lang.String suffix)
public static <any> prepend(java.lang.String prefix)
public static <any> formatter(java.lang.String pattern)
public static <any> formatterForArray(java.lang.String pattern)
public static <any> formatterForIterable(java.lang.String pattern)
public static <any> joiner(java.lang.String separator)
public static <any> joinerForArray(java.lang.String separator)
public static <any> toStringFunction()
Functions#toStringFunction()
public static <any> length()
public static <any> surround(java.lang.String prefix, java.lang.String suffix)
public static <any> trim()
public static <any> trimEnd()
public static <any> toLowerCase()
public static <any> toUpperCase()
public static <any> convertCase(CaseFormat src, CaseFormat target)