typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR;
// .....
LPCSTR foo = "hello world";
How do I search if foo
contains hello
?
CodePudding user response:
You can use strstr
LPCSTR foo = "hello world";
char * pch = strstr (foo,"hello");
typedef _Null_terminated_ CONST CHAR *LPCSTR, *PCSTR;
// .....
LPCSTR foo = "hello world";
How do I search if foo
contains hello
?
CodePudding user response:
You can use strstr
LPCSTR foo = "hello world";
char * pch = strstr (foo,"hello");