Hi everybody,
i’ve been struggling with this over the past three days and can’t sort it out.
I need to modify all the letters of a text into something else, in this case is an “underscore” like an hint for a quiz that gives you the exactly numbers of letters in the solution.
Example: Solution is “France” (which is in global variable so it changes everytime) and need to convert into “_____”
I have watched loads of tutorials but all of them are showing how to convert a certain known letter to another one and this is not helping me.
I have tried “for each item in list” “for each number in list” using the replace all text with no luck at all.
Still gives me just one “_” or “U_n_i_t_e_d_S_t_a_t_e_s”
And the problem will be bigger with answers that cointains 2 or more words.
Another solution i tried was to calculate how many letters are in the word, but it gets complicated when “spaces” comes in and i have no idea how to set “_” moltiplied for “numbers of letters” except variables spaces.
Yes, exactly like that:
France, 5 letters, 5 underscores.
United States, 12 lettere, 6underscores space 6 underscores.
i hope this is going to help to determinate the first letter of the solution too, in order to give it as second hint for guessing the word:
F____
U_____ S_____
The only thing it comes up in mind is to get the lenght of the “solution” and:
If lenght-solution = 5
Then set TextBox.Text to “_ _ _ _ _ "
If lenght-solution = 4
Then set TextBoc.Text to " _ _ _”
But there are more then 50 solutions, it will be an hard work, im sure there’s a much easier way.
Also it cant allow me to get the second hint:
“F_ _ _ _ _”