public final class SshShellOutputStringHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
beforeLast(String text,
String before)
Returns the string before the given token
If this token is repeating, than return all text
before the last token
|
static <T> Optional<T> |
beforeLast(String text,
String beforeLast,
Function<String,T> mapper)
Returns an object before the given last token
|
static String |
betweenBeforeLast(String text,
String after,
String beforeLast)
Returns the string between the given tokens
|
static <T> Optional<T> |
betweenBeforeLast(String text,
String after,
String before,
Function<String,T> mapper)
Returns an object between the given token
|
public static String beforeLast(String text, String before)
text - the textbefore - the token which is expected to be repeatedpublic static <T> Optional<T> beforeLast(String text, String beforeLast, Function<String,T> mapper)
text - the textbefore - the last tokenmapper - a mapping function to convert the string before the token to type Tpublic static String betweenBeforeLast(String text, String after, String beforeLast)
text - the textafter - is the starting token to skip the text before that.before - the last tokenpublic static <T> Optional<T> betweenBeforeLast(String text, String after, String before, Function<String,T> mapper)
text - the textafter - the before last tokenbefore - the after tokenmapper - a mapping function to convert the string between the token to type TApache Camel