Posted on 2001-07-02
I use Borland cpp Builder and Borland's components all rely on the AnsiString class which can hold a text string.
This class incorporates a lot of easy to use functions to work with text strings. E.g. a string can also grow etc. String A = B + C ; // B and C are strings too.
In my code (engine stuff, not GUI) I turn to char* and functions such as strlen(), strncpy() ect.
I mainly do this to not have to rely on Borland specific implementations, to easily port to other environments etc..
I'm now doubting if that is the correct approach as there are lots of limitations (e.g. the strings can not grow etc. ...).
The question ... do other environments (e.g. Visual C) also use a class called AnsiString and is the same functionality supported (because if it is ... this String class is a powerfull feature) or are there other ways ... or is it best to work with the basic stuff char* strnlen() etc ...