2026-10-29 22:07:36 +03:00 | | | //+------------------------------------------------------------------+
|
| | | //| FindLast: поиск последнего вхождения подстроки |
|
| | | //+------------------------------------------------------------------+
|
2026-10-28 23:43:05 +03:00 | | | 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;
|
| | | }
|