Merge branch 'master' into 1.17

# Conflicts:
#	gradle.properties
This commit is contained in:
gnembon committed 2021-01-15 11:41:07 -04:00
commit 981dcf6eaa
6 files changed
+21 -7

No files matched your search

@@ -350,6 +350,11 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf
@Override
public Value split(Value delimiter) {
ListValue result = new ListValue();
if (delimiter == null)
{
this.forEach(item -> result.items.add(of(item)));
return result;
}
int startIndex = 0;
int index = 0;
for (Value val : this.items)
+5 -1
View File
@@ -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()));
}