Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2108-standardlibrary-stringoperations-cstring.md
T
2026-06-23 21:47:51 +08:00

69 lines
1.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CString
CString is a class for simplified access to the variables of string type.
### Description
CString class provides simplified access to MQL5 API functions working with string variables.
### Declaration
```
   class CString: public CObject
```
### Title
```
   #include <Strings\String.mqh>
```
```
Inheritance hierarchy
  CObject
      CString
```
### Class Methods by Groups
| Data access methods | |
| --- | --- |
| Str | Gets a string |
| Len | Gets length of a string |
| Copy | Copies a string copy |
| Fill methods | |
| Fill | Fills a string |
| Assign | Assigns a string |
| Append | Appends a string |
| Insert | Inserts a string |
| Compare methods | |
| Compare | Compares strings |
| CompareNoCase | Performs a case insensitive string comparison |
| Substring methods | |
| Left | Gets a substring from the left |
| Right | Gets a substring from the right |
| Mid | Gets a substring from the middle |
| Trim/delete methods | |
| Trim | Trims a string from the left and from the right |
| TrimLeft | Trims a string from the left |
| TrimRight | Trims a string from the right |
| Clear | Clears a string |
| Convert methods | |
| ToUpper | Converts a string to uppercase. |
| ToLower | Converts a string to lowercase. |
| Reverse | Reverses a string |
| Search methods | |
| Find | Searches a substring left to right |
| FindRev | Searches a substring right to left |
| Remove | Deletes a substring |
| Replace | Replaces a substring |
```
Methods inherited from class CObject
Prev, Prev, Next, Next, Save, Load, Type
```