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 TypeInputResult TypeResult
java.util.ArrayList[here, are, my, strings]java.lang.Stringherearemystrings
java.util.ArrayList[single]java.lang.Stringsingle
java.util.ArrayList[]java.lang.String
nullnull

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 TypeInputResult TypeResult
java.util.ArrayList[here, are, my, strings]java.lang.Stringhere-are-my-strings
java.util.ArrayList[single]java.lang.Stringsingle
java.util.ArrayList[]java.lang.String
nullnull

results matching ""

    No results matching ""