Got a bit of a technical question. I have a string variable that I want to make completely lowercase. There’s an old thread for this question involving the *script command, but I can’t seem to get the solution working. In fact, I can’t seem to get the *script command working at all.
My first attempt looked roughly like this:
*temp var1 “AAAAAA”
*temp var2 var1
*script temps.var2 = temps.var2.toLowerCase()
${var2}
The output to this would be:
AAAAAA
when the expected output is:
aaaaaa
And then I tried to simplify things and just tried to set var2 to any kind of string.
*temp var1 “AAAAAA”
*temp var2 var1
*script temps.var2 = “aaaaaa”
${var2}
Same results. No errors, but not what I was expecting. Am I missing something? Or has ChoiceScript changed since that thread five years ago?
I don’t have the answer to the specific question, however, can’t you define the variable in lowercase? Because it’s easy to capitalize the entire content of a string variable on demand. You just need two exclamation marks.