leptictidium
09-13-2009, 03:27 PM
I have a string called algorithm. I want to replace all the letters "B" in this string with "U", all the "F"s with "D"s, all the "U"s with "F"s, and all the "D"s with "B"s. This code doesn't work because if the original string is "B", then the final string will be "F" instead of "U".
algorithm = Replace(algorithm, "B", "U")
algorithm = Replace(algorithm, "F", "D")
algorithm = Replace(algorithm, "U", "F")
algorithm = Replace(algorithm, "D", "B")
How do i fix this? Thx for any help!
algorithm = Replace(algorithm, "B", "U")
algorithm = Replace(algorithm, "F", "D")
algorithm = Replace(algorithm, "U", "F")
algorithm = Replace(algorithm, "D", "B")
How do i fix this? Thx for any help!