StringBuilder class
I am attempting to use the stringbuilder class as a command buffer for commands that are being received via TCP. Since there is no guarantee that the entire command will be received on the server end, I have my receive thread simply append the command to a variable of type Stringbuilder. This works fine to continue to build the buffer but there are not any methods to find and pull out the command string from the buffer.
At this point, I am planning to use the Instr function to find the command termination sequence and then use the Left function to retrieve the complete command. Each of these functions require a string as input so I am planning to constantly use the .ToString method of the stringbuilder.
Am I missing something, or is this probably the best way to accomplish what I want to do? I know that I could simply use a string variable, but since string variables always create a new instance of the variable upon concatenation, I am concerned that the stack would start to bog down after the application has been running for some time.
Guess it would be nice if the stringbuilder class would provide some addtional methods that cloned the Instr, StrComp, Left, Right, and Mid functions.
Tony

