Test if given string is a valid C or LabTalk compatible string to define a variable
BOOL is_good_C_identifier_ex( LPCSTR lpcsz, LPCSTR lpcszExtraAllowedChars )
True if the string is a valid string to define a variable ,False if not.
EX1
void is_good_C_identifier_ex_ex1() { string str = "ab*c#"; string strAllow = "*#"; //change strAllow to other char set to see different result bool bRet = is_good_C_identifier_ex(str , strAllow); if(bRet) printf("\"%s\" is a good identifier with allow char set \"%s\"\n" , str,strAllow); else printf("\"%s\" is not a good identifier with allow char set \"%s\" \n" , str ,strAllow); }
is_good_C_identifier
origin.h