Skip to content

Methods

String manipulation methods

Name Description
SubStr(int, int) Extracts a substring from a larger string starting at a specified index for a given length.
Find(CdString, int) Returns the postion of the given string.
Compare(const char *) Returns a int value after comparing two strings.
Append(const char) Adds the string passed as parameter to the string calling the method.
Swap(CdString &) Swaps the values inside two string variables.
Empty() Returns void clearing the data in the string variable.
MakeLower() Changes all the characters in the string to lower case.
MakeUpper() Changes all the characters in the string to upper case.

Get methods

Name Description
GetLength() Returns the length of the string.
IsEmpty() Returns a bool value after checking if the string is empty.

Operators

Operator Description
= Assignment
[ ] Indexing
+= Append
+ Concatenate
== Compare
!= Not Equal
< Less than
> Greater than
>= Less than or equal to
<= Greater than or equal to
(const char*) Conversion operator
In Code