Last active
June 24, 2018 14:32
-
-
Save DamianSuess/378fe89194ffc2813543e53a310d79d6 to your computer and use it in GitHub Desktop.
C++ string functions from VB6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2006 - DS | |
// | |
// string Mid(int, int, string); | |
// int InStr(int, string, string); | |
// string Left(string, int); | |
// string Right(string, int); | |
string Mid( int posStart, int intLen, string strSearch ) | |
{ | |
return strSearch.substr(posStart, intLen); | |
} | |
int InStr(int startPOS, string strSearch, string strFind) | |
{ | |
//return strSearch.find(strFind); | |
return strSearch.find(strFind, startPOS); | |
} | |
string Left(string strSearch, int intLen) | |
{ | |
return strSearch.substr(0, intLen); | |
} | |
string Right(string strSearch, int intLen) | |
{ | |
return strSearch.substr(strSearch.length() - intLen, intLen); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment