#Convert an array of strings to a slice of strings

1 messages · Page 1 of 1 (latest)

blissful frost
#

How can i?

#

i have [4][]const u8 and i want [][]const u8

buoyant cosmos
#

from the code you sent in #programming-discussion message you gotta make the array var or make the paramater []const[]const u8

spare wolf
#

^

buoyant cosmos
#

[][]const u8 is a mutable slice but the array you were using is const which isnt allowed

blissful frost
#

it works, thanks!

buoyant cosmos
#

also is an array of strings necessary for what youre doing? theyre all just 1 char

blissful frost
#

it is, not all indicators are one byte big

#

i give the ability to give custom ones