Join Slack
Powered by
Have you tried using the spread operator? `context...
# android
g
gian
10/01/2019, 2:23 PM
Have you tried using the spread operator?
context.getString(resId, *args)
j
John
10/01/2019, 2:27 PM
Okay that works
John
10/01/2019, 2:28 PM
So that means
vararg
does not compile to
Array
, but
*vararg
does (?)
g
gian
10/01/2019, 2:38 PM
vararg measn you get an array with arguments. If you then want to pass this array to another function acception vararg, you have to spread it
gian
10/01/2019, 2:38 PM
https://kotlinlang.org/docs/reference/functions.html#variable-number-of-arguments-varargs
9
Views
Open in Slack
Previous
Next