查找多字节字符串中的字符 CharNext
#include <stdio.h>
#include <conio.h>
#include <Windows.h>
int main(int argc, char* argv[])
{
char szBuf[] = "Hello你好!";
printf("%s/r/n", szBuf);
const char * p = szBuf;
while(strlen(p) > 0)
{
p = CharNext(p);
printf("%s/r/n", p);
}
_getch();
return 0;
}
输出结果:
Hello你好!
ello你好!
llo你好!
lo你好!
o你好!
你好!
好!
!