MQL4参考 字符串函数 StringTrimRight

StringTrimRight

The function cuts line feed characters, spaces and tabs in the right part of the string after the last meaningful symbol. The string is modified at place.

string  StringTrimRight(
   const string  text      // string to cut
   );

Parameters

text

[in]  String that will be cut from the right.

Return Value

A copy of the cut string if possible, otherwise an empty string.

Exampe:

  string str1 = "  Hello world   ";
  string str2=StringTrimRight(str1);
  // after right trim str2 will be equal to "  Hello World"