Make split split lists in list of single elements list without delimiter
This commit is contained in:
3 files changed
+7
-3
No files matched your search
@@ -193,7 +193,11 @@ public abstract class Value implements Comparable<Value>, Cloneable
|
||||
|
||||
public Value split(Value delimiter)
|
||||
{
|
||||
try
|
||||
if (delimiter == null)
|
||||
{
|
||||
delimiter = StringValue.EMPTY;
|
||||
}
|
||||
try
|
||||
{
|
||||
return ListValue.wrap(Arrays.stream(getString().split(delimiter.getString())).map(StringValue::new).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user