Hi Slackers, lease help... can't figure this one a...
# announcements
a
Hi Slackers, lease help... can't figure this one and can't find it via Google. Should be simple...
"The %s %s fox jumped over the %s dog".format(<http://Locale.US|Locale.US>, adjectives)
adjectives
is a
MutableList<String>
with 3 entries I keep getting
MissingFormatArgumentException
. Have tried casting to
TypedArray
,
Array<Any>
, and more. Thank you!
g
andyg: use the spread operator: eg
"The %s %s fox jumped over the %s dog".format(<http://Locale.US|Locale.US>, *adjectives)
a
Yes! Actually I had to cast to array first:
*adjectives.toTypedArray()
Thanks J!
g
👍