I have a long string of tokens, let's say "A;B;C". I want to select one at random and then remove it from the string, so that when I select another at random, it can't select the one that's already been picked. So if "B" gets selected, it becomes "A;C".
First goto was replace(string, token&";", "") and this works well, except for when the last token is picked ("C" in the example). Since it doesn't have ";" after it, it doesn't get deleted by the replace function. I had to make a whole different check for if the token selected is the last token in the line.
Just want to make sure I'm not overthinking/engineering this thing. Am I on the right track?