- Joined
- Nov 23, 2006
- Sythe Gold
- 1,609
- Messages
- 7,145
- Location
- Canada
- Discord Unique ID
- 178533992981594112
I use this function way too often in VB, C#, etc, whenever I'm parsing, and to my dismay I found nothing like it on Google, so I made my own.
Voila:
Uses the <string> header
Voila:
Code:
string getBetween(string fullstring, string start, string end)
{
int spos = fullstring.find(start) + start.length();
int epos = fullstring.find(end);
int length = (epos - spos);
return fullstring.substr(spos, length);
}
Uses the <string> header


























