【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.2.18 is_str_match_begin
Contents
Description
Check if a string begins with a particular string
Syntax
bool is_str_match_begin( LPCSTR lpcszStart, LPCSTR lpcsz )
Parameters
- lpcszStart
- [input] start string
- lpcsz
- [input] string to search
Return
TRUE is lpcsz starts with lpcszStart, otherwize FALSE.
Examples
EX1
void is_str_match_begin_ex1() { string str = "origin lab"; string substr = "origin"; //Change to "Origin" or "opq" to see different results bool bRet = is_str_match_begin(substr , str); if(bRet) printf("\"%s\" begins with \"%s\" \n",str,substr); else printf("Match failed"); }
Remark
For the function 's input parameters ,lower case char in lpcszStart will match upper case char in lpcsz,however upper case char in lpcszStart will not match lower case char in lpcsz.So callers should make lpcszStart as lower case char sets to make function fully case insensitive.
See Also
Header to Include
origin.h