#Replace random letters with other random letters in text

1 messages · Page 1 of 1 (latest)

wooden bone
#

How can I replace 5 random letters in the variable {_text} with other random letters? The variable {_alphabet::*} contains all the letters that can be used for the replacement. Can anyone help me please?

viscid moth
#

shuffle the list and get the first two elements. replace the first with the second

wooden bone
viscid moth
#
wooden bone
odd stirrup
#

Yes

viscid moth
#

sure, get the 5th character

#
odd stirrup
#

You can also split the string at “”, which will return a list of characters. Then you can edit {_char::n} (for as many n as you need), then join the list back up into a big string

wooden bone
viscid moth
#

split your text at "", set the 5th element of the list to a random letter, join the list

wooden bone
odd stirrup
#

Which part confuses you?

wooden bone
#

how to split that text

odd stirrup
#

Set a list var to the string split at “”

#

”example” split at x” => “e” and “ample”
”example” split at “” => “e”,”x”, … ”l”, ”e”

wooden bone
wooden bone
#

this dont work

odd stirrup
wooden bone
#

uuh, how please, it dont work

odd stirrup
#

no the string

#

just your variable

wooden bone
#

Ihave it, thank you