FANDOM


$PIECE(string, delimiter, field_index)

Explode string into an array using delimiter, and return the field_indexth element of the array.

$PIECE("ABC,DEF,GHI", ",") -> "ABC"

$PIECE("ABC,DEF,GHI", ",", 2) -> "DEF"

$PIECE("ABC,DEF,GHI", ",", 2, 3) -> "DEF,GHI"

$PIECE("ABC,DEF,GHI", ";") -> "ABC,DEF,GHI"

$PIECE("ABC,DEF,GHI", ",", 5) -> ""