How to turn a static var string into array

My code below is a string inside of a struct. How can do the exact same thing expect replace the string with a array.

         struct gv{
        static var mystruct = [String]();
     
    }

Hi @timswift

The code you provided does exactly what you are looking for, it’s an array of String objects.
Static variable of type String would look like this:

struct gv
{
        static var mystruct:String = "some value";
}

This topic was automatically closed after 166 days. New replies are no longer allowed.