vb.net - Replace Strings Synchronously? -
i'm still considered beginner @ programming. i'm creating simple program create "upside down" style text, have run problem cannot solve.
i check textbox , replace characters string.replace. example here:
input = input.replace("d", "p") 'upside down d .... input = input.replace("p", "d") 'upside down p
makes "d"s turn "p"s "d"s again. there method @ same time?
i appreciate answer. thanks.
iterate on characters 1 one, building new string
in stringbuilder
or stringbuffer
, don't change original string
reference got.
edit - sample code
here sample code, don't remember vb syntax suppose below correct:
dim text string = "hello world" dim sb new stringbuilder() each c char in text if c = "a" sb.append("ɐ") if c = "a" sb.append("∀") ' ... ' ... ' rest of cases same way ' ... next text = strreverse(sb.tostring())
Comments
Post a Comment