I need to assign a new string value to completely replace the existing string value in a StringBuilder
object.
But,
sb.Append()
will only add to the end of a string, and sb.Insert(0,stringVal)
will only add to the beginning of the string.
sb.Replace()
will replace PART of the string, IF I know what part of it is to look for it.
I simply need to just replace the entire sb
string value with a new value even though I do not know what the current contents of the string is.
sb.Clear()
removes all characters from the current StringBuilder instance.