StringJoin
See javadoc - uk.gov.gchq.koryphe.impl.function.StringJoin
Available since Koryphe version 1.9.0
Joins together all strings in an iterable using the supplied delimiter.
Examples
Without a delmiter
Java
JSON
Full JSON
Python
final StringJoin function = new StringJoin();
{
"class" : "StringJoin"
}
{
"class" : "uk.gov.gchq.koryphe.impl.function.StringJoin"
}
g.StringJoin()
Input type:
java.lang.Iterable
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
java.util.ArrayList | [here, are, my, strings] | java.lang.String | herearemystrings |
java.util.ArrayList | [single] | java.lang.String | single |
java.util.ArrayList | [] | java.lang.String | |
null | null |
With a delimiter
Java
JSON
Full JSON
Python
final StringJoin function = new StringJoin("-");
{
"class" : "StringJoin",
"delimiter" : "-"
}
{
"class" : "uk.gov.gchq.koryphe.impl.function.StringJoin",
"delimiter" : "-"
}
g.StringJoin(
delimiter="-"
)
Input type:
java.lang.Iterable
Example inputs:
Input Type | Input | Result Type | Result |
---|---|---|---|
java.util.ArrayList | [here, are, my, strings] | java.lang.String | here-are-my-strings |
java.util.ArrayList | [single] | java.lang.String | single |
java.util.ArrayList | [] | java.lang.String | |
null | null |