在MSDN中找strstr()函数,里面有一些处理字符串的函数。或许会比CString好一些。
解决方案 »
- vs2010 资源在另一个编辑器中打开 怎么回事?
- CSocket的Accept是阻塞的吗???
- 9054的DDK驱动中断问题,急请有经验的高手?
- TechExcel(中国)有限公司诚聘VC++ 高级开发工程师
- !!!!CJlibrary v6.09的下载地址!!!!!!CJ60界面类库的终结版本!!!
- 为什么CEdit只能输入256个字符啊。不是说可以输入32k吗?请赐教,谢谢!!!!
- 申请本版版主,望各位支持
- 在ATL制作的ASP组件中,我想如果不符合条件就将页面指向一个HTML页面,在组件中实现,用那个函数啊,谢谢
- 究竟发生了什么?
- vc++6.0技术内幕(第四版),就要第四版,我想买但买不到了,谁有愿意转让,给我写信 [email protected],急用
- help me ,please
- 关于使用HTTP穿过需要验证的代理服务器下载文件或发送请求的问题。。。急。。。
* to print all the tokens (separated by commas
* or blanks) in the string named "string".
*/#include <string.h>
#include <stdio.h>char string[] = "A string\tof ,,tokens\nand some more tokens";
char seps[] = " ,\t\n";
char *token;void main( void )
{
printf( "%s\n\nTokens:\n", string );
/* Establish string and get the first token: */
token = strtok( string, seps );
while( token != NULL )
{
/* While there are tokens in "string" */
printf( " %s\n", token );
/* Get next token: */
token = strtok( NULL, seps );
}
}
OutputA string of ,,tokens
and some more tokensTokens:
A
string
of
tokens
and
some
more
tokens