StringTrim
See javadoc - uk.gov.gchq.koryphe.impl.function.StringTrim
Available since Koryphe version 1.9.0
Trims all whitespace around a string.
Examples
Trim strings
Java
JSON
Full JSON
Python
final StringTrim function = new StringTrim();
{
"class" : "StringTrim"
}
{
"class" : "uk.gov.gchq.koryphe.impl.function.StringTrim"
}
g.StringTrim()
Input type:
java.lang.String
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
java.lang.String | trailing spaces | java.lang.String | trailing spaces |
java.lang.String | leading spaces | java.lang.String | leading spaces |
java.lang.String | noSpaces | java.lang.String | noSpaces |
null | null | ||
java.lang.Long | 54 | ClassCastException: java.lang.Long cannot be cast to java.lang.String |