public class StringFunctions
extends java.lang.Object
Constructor and Description |
---|
StringFunctions() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Function<java.lang.String,java.lang.String> |
append(java.lang.String suffix) |
static com.google.common.base.Function<java.lang.String,java.lang.String> |
convertCase(com.google.common.base.CaseFormat src,
com.google.common.base.CaseFormat target) |
static com.google.common.base.Function<java.lang.Object,java.lang.String> |
formatter(java.lang.String pattern)
given e.g.
|
static com.google.common.base.Function<java.lang.Object[],java.lang.String> |
formatterForArray(java.lang.String pattern)
given e.g.
|
static com.google.common.base.Function<java.lang.Iterable<?>,java.lang.String> |
joiner(java.lang.String separator)
joins the given objects in a collection as a toString with the given separator
|
static com.google.common.base.Function<java.lang.Object[],java.lang.String> |
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 com.google.common.base.Function<java.lang.String,java.lang.Integer> |
length()
returns function which gives length of input, with -1 for nulls
|
static com.google.common.base.Function<java.lang.String,java.lang.String> |
prepend(java.lang.String prefix) |
static com.google.common.base.Function<java.lang.String,java.lang.String> |
surround(java.lang.String prefix,
java.lang.String suffix)
Surrounds an input string with the given prefix and suffix
|
static com.google.common.base.Function<java.lang.String,java.lang.String> |
toLowerCase() |
static com.google.common.base.Function<java.lang.Object,java.lang.String> |
toStringFunction()
provided here as a convenience; prefer
Functions.toStringFunction() |
static com.google.common.base.Function<java.lang.String,java.lang.String> |
toUpperCase() |
static com.google.common.base.Function<java.lang.String,java.lang.String> |
trim() |
public static com.google.common.base.Function<java.lang.String,java.lang.String> append(java.lang.String suffix)
public static com.google.common.base.Function<java.lang.String,java.lang.String> prepend(java.lang.String prefix)
public static com.google.common.base.Function<java.lang.Object,java.lang.String> formatter(java.lang.String pattern)
public static com.google.common.base.Function<java.lang.Object[],java.lang.String> formatterForArray(java.lang.String pattern)
public static com.google.common.base.Function<java.lang.Iterable<?>,java.lang.String> joiner(java.lang.String separator)
public static com.google.common.base.Function<java.lang.Object[],java.lang.String> joinerForArray(java.lang.String separator)
public static com.google.common.base.Function<java.lang.Object,java.lang.String> toStringFunction()
Functions.toStringFunction()
public static com.google.common.base.Function<java.lang.String,java.lang.Integer> length()
public static com.google.common.base.Function<java.lang.String,java.lang.String> surround(java.lang.String prefix, java.lang.String suffix)
public static com.google.common.base.Function<java.lang.String,java.lang.String> trim()
public static com.google.common.base.Function<java.lang.String,java.lang.String> toLowerCase()
public static com.google.common.base.Function<java.lang.String,java.lang.String> toUpperCase()
public static com.google.common.base.Function<java.lang.String,java.lang.String> convertCase(com.google.common.base.CaseFormat src, com.google.common.base.CaseFormat target)