Join Slack
Powered by
Hi, why is spread operator not work with split(): ...
# getting-started
h
hoang
06/23/2021, 7:50 AM
Hi, why is spread operator not work with split():
https://pl.kotl.in/5xrsPYB2c
a
Albert Chang
06/23/2021, 8:00 AM
If the vararg is of primitive type, you have to use the corresponding primitive array type, in this case
charArrayOf()
.
h
hoang
06/23/2021, 9:05 AM
Wow nice. It works. Thank you very much
@Albert Chang
👍 1
e
ephemient
06/23/2021, 9:39 PM
there are some issues with generics, e.g.
https://youtrack.jetbrains.com/issue/KT-9495
but other than that, yes you just need the right type array
Open in Slack
Previous
Next