Download MetaTrader 5
MQL5 ReferenceString Functions 

String Functions

This is a group of functions intended for working with data of the string type.

Function

Action

StringAdd

Adds a string to the end of another string

StringBufferLen

Returns the size of buffer allocated for the string

StringCompare

Compares two strings and returns 1 if the first string is greater than the second; 0 - if the strings are equal; -1 (minus 1) - if the first string is less than the second one

StringConcatenate

Forms a string of parameters passed

StringFill

Fills out a specified string by selected symbols

StringFind

Search for a substring in a string

StringGetCharacter

Returns the value of a number located in the specified string position

StringInit

Initializes string by specified symbols and provides the specified string length

StringLen

Returns the number of symbols in a string

StringReplace

Replaces all the found substrings of a string by a set sequence of symbols

StringSetCharacter

Returns a copy of a string with a changed value of a symbol in a specified position

StringSplit

Gets substrings by a specified separator from the specified string, returns the number of substrings obtained

StringSubstr

Extracts a substring from a text string starting from a specified position

StringToLower

Transforms all symbols of a selected string to lowercase

StringToUpper

Transforms all symbols of a selected string into capitals

StringTrimLeft

Cuts line feed characters, spaces and tabs in the left part of the string

StringTrimRight

Cuts line feed characters, spaces and tabs in the right part of the string


Updated: 2015.12.03