

To declare a string, use the AnsiString word followed by a valid C++ name. In some other scenarios you will need to declare and possibly initialize a string before using it. Based on these two facts, you have already used and implemented AnsiString values. Many other controls such as the edit box use the AnsiString class as the basis of their text. All controls that use a caption (forms, panels, labels, etc) have their Caption property set as an AnsiString value. There are so many functions that we will review only those that are most used in this book but all functions that were created in the libraries are highly valuable and can save you a tremendous amount of code writing and headache. Almost any possible operation that can be performed on a string is supported. It is simply incredible the level of work and support provided by the VCL to its strings and text-related operations. Therefore, it has a high level of independence and flexibility from the application or the control that wants to use it. TheĪnsiString class is not derived from TObject. String operations in C++ Builder are mainly performed using a class called AnsiString.
