the automatic java->kotlin translator has done ...
# random
e
the automatic java->kotlin translator has done the following:
expression.trim().toCharArray()
->
expression.trim { it <= ' ' }.toCharArray()
is there a reason?
m
I think it's because Java's trim just trims all characters with ASCI-code less than 0x20, while Kotlin recognizes other whitespace-characters as well.
e
such as?
m
Java has
strip
available from Java 11, which I think works the same way as Kotlin's
trim
.
thanks for pointing it out!