Could half the mapping time by checking first if the string contains the masking character before calling replace() (why does this make any difference?)
This commit is contained in:
parent
face00e2a7
commit
fd1343d8b9
|
@ -742,7 +742,10 @@ open class ResponseParser @JvmOverloads constructor(
|
|||
elements.add(dataString.substring(startIndex))
|
||||
}
|
||||
|
||||
return elements.map { it.replace(Separators.MaskingCharacter + separator, separator) }
|
||||
return elements.map {
|
||||
if (it.contains(Separators.MaskingCharacter + separator)) it.replace(Separators.MaskingCharacter + separator, separator.toString())
|
||||
else it
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue