Get the last char of a string
char str_end_char( LPCSTR lpcsz, int * nEndPos = NULL )
-1 if the given string is empty, otherwise the last character
EX1
void str_end_char_ex1() { string str = "abcdefg"; int nEndPos; int nRet = str_end_char(str , &nEndPos); if( -1 == nRet ) printf("string is empty\n"); else printf("the end char is %c\nthe end position is %d\n", nRet, nEndPos); }
str_pad_char
origin.h