https://kotlinlang.org logo
#random
Title
# random
m

mp

08/23/2022, 9:11 AM
hi there do we have String equivalent of IntArray\LongArray in std lib? thx
k

Klitos Kyriacou

08/23/2022, 9:14 AM
Yes: Array. 😉
😁 2
👍 1
👍🏾 1
s

Sam

08/23/2022, 9:14 AM
There wouldn’t be a benefit to a
StringArray
type: you can just use an
Array<String>
.
IntArray
and
LongArray
store their values as primitives instead of objects, which could improve performance for those types. Strings are always objects, so the distinction doesn’t apply.
👌 1
m

mp

08/23/2022, 9:16 AM
oops feel ashamed now =( still tnx!
10 Views