subject,
count,
isInsensitive);
}
else if (replace instanceof ArrayValue) {
ArrayValue searchArray = (ArrayValue) search;
ArrayValue replaceArray = (ArrayValue) replace;
Iterator<Value> searchIter = searchArray.values().iterator();
Iterator<Value> replaceIter = replaceArray.values().iterator();
while (searchIter.hasNext()) {
Value searchItem = searchIter.next();
Value replaceItem = replaceIter.next();
if (replaceItem == null)
replaceItem = NullValue.NULL;
subject = strReplaceImpl(env,
searchItem.toStringValue(),
replaceItem.toStringValue(),
subject,
count,
isInsensitive);
}
}
else {
ArrayValue searchArray = (ArrayValue) search;
Iterator<Value> searchIter = searchArray.values().iterator();
while (searchIter.hasNext()) {
Value searchItem = searchIter.next();
subject = strReplaceImpl(env,