mt5-manager/docs/articles/part-04/publish/code/03_cpp.txt
14 lines
477 B
Text
//+------------------------------------------------------------------+
//| FindLast: поиск последнего вхождения подстроки |
//+------------------------------------------------------------------+
int FindLast(const string text, const string what)
{
int pos = -1;
int next = StringFind(text, what, 0);
while(next >= 0)
{
pos = next;
next = StringFind(text, what, next + 1);
}
return pos;
}