#Replacing strings with hyphens

11 messages · Page 1 of 1 (latest)

exotic glen
#

How would I go about replacing characters in a text with a "-" sign for each character. (not counting spaces) so if they typed "Golden Trophy" it would pop up as "------ ------"

mental tundra
#

Just type ising hyphens rather than normal letters

exotic glen
#

That's not the point... the player who chooses the prompt can see it, after 10 seconds, he can't

vague ginkgo
#

Loop over every character in the string.
If the current character in the loop is not a space, add a hyphen to a string variable.
If it is a space, add a space to the same string variable.

#

After the loop it will be completed

#

If you are certain that the spaces will always be a certain amount of spaces long,
Use string split white space, and iterate over each item in that list instead.
Use string substring, with the input string being a bunch of hyphens, and use the String Length of the current element in the loop for the length input of the substring chip. Add the output of the substring chip to a string variable, and add a space to the end if you are not on the last element of the list.

#

Pretty rocky explanation, but there are definitely more than one or two ways to do this.

formal goblet
exotic glen