how to create a list of strings with values given at compile time. And these values are fixed so conceptually the object can be a constant too. It cant be a global object so it cant be static.
I tried to make it this way:
const numberth: [String;12] = [String::from("First"),String::from("Second"),String::from("Third"),String::from("Fourth"),String::from("Fifth"),String::from("Sixth"),String::from("Seventh"),String::from("Eighth"),String::from("Nineth"),String::from("Tenth"),String::from("Eleventh"),String::from("Twelveth")];
but it tells me that
calls in constants are limited to struct and enum
I also tried
const numberth: [String;12] = ["First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Nineth","Tenth","Eleventh","Twelveth"];
but gave the following error
expected type
std::string::String
found type&'static str