The String is one of the most used data types in any programming language. Like other data types, String takes its memory allocation, and in TestComplete, Strings are represented as OLE-compatible variants.
The Strings are recognized as a sequence of characters enclosed in a matching pair of quotation marks. The quotation marks could be either single (') or double ("); both are treated equally and considered as having a String value.
The following are some examples of some valid Strings:
The String object is available for all supported scripting languages so that users can operate and use string values regardless of the chosen language.
Let's understand how to insert special characters into a String:
We can add special characters to a String by using a backslash (\) symbol. We can insert different types of special characters, such as apostrophes, new lines, quotes, and other special characters.
Consider the below example:
Let's see another example:
The String is 12 character(s) long.
Thus, We can insert any special characters in our String text.