Shabinder Singh
10/12/2021, 8:42 AMTypeError: unboxChar(...).slice is not a function
when doing following :
val s = "jh:function(a,b){var c=a[0];a[0]=a[b%a.length];a[b%a.length]=c}"
println(s.split(delimiters = charArrayOf(':'),ignoreCase = true,limit = 2).joinToString("\n"))
However this will work :
s.split(':',limit = 2).joinToString("\n")
Playground Link:
https://pl.kotl.in/BKb4LGL3A
this seems like a JS BUG.
Try in JVM mode it will work, but in JS it give above error.