Hello,
Trying to get my head around this. If I have a word string that can contain any word how can I return a variable that provides the number of different letters contained in that word.
Example:
var number_of_different_letters;
string myword = "potatoe"; // the word
string myword2 = "rocket"; // another word
Is it possible to assign the number of different letters from these strings into the variable number_of_different_letters?
So for
myword: number_of_different_letters = 5; since there are 2 instances of t and 0
myword2: number_of_different_letters = 6;// all different letters
Would appreciate any help.
best regards,
Rob