<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>中文Flex例子 &#187; 函数库</title>
	<atom:link href="http://blog.minidx.com/tag/%e5%87%bd%e6%95%b0%e5%ba%93/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.minidx.com</link>
	<description>中文Adobe Flex例子,Flex实例教程,RIA资源,全文检索技术,算法和数据结构</description>
	<lastBuildDate>Thu, 31 Mar 2011 03:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>C语言中利用strtok函数进行字符串分割</title>
		<link>http://blog.minidx.com/2008/02/03/469.html</link>
		<comments>http://blog.minidx.com/2008/02/03/469.html#comments</comments>
		<pubDate>Sun, 03 Feb 2008 15:40:32 +0000</pubDate>
		<dc:creator>Minidxer</dc:creator>
				<category><![CDATA[程序开发相关]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[strtok]]></category>
		<category><![CDATA[函数库]]></category>
		<category><![CDATA[字符串]]></category>

		<guid isPermaLink="false">http://blog.minidx.com/2008/02/03/469.html</guid>
		<description><![CDATA[C语言不像Java,Php之类的高级语言，对象中直接封装了字符串的处理函数。C语言中进行普通的字符串处理也经常会让我们焦头烂额……不过好在C语言中还是提供了像strtok这样功能强大的字符串处理函数，可以帮我们实现部分需要的功能。下面我们介绍一下strtok函数的用法以及具体的使用例。








原型：char *strtok(char *s, char *delim);
功能：分解字符串为一组字符串。s为要分解的字符串，delim为分隔符字符串。实质上的处理是，strtok在s中查找包含在delim中的字符并用NULL(&#8217;\0&#8242;)来替换,直到找遍整个字符串。
说明：首次调用时，s指向要分解的字符串，之后再次调用要把s设成NULL。strtok在s中查找包含在delim中的字符并用NULL(&#8217;\0&#8242;)来替换，直到找遍整个字符串。
返回值：从s开头开始的一个个被分割的串。当没有被分割的串时则返回NULL。所有delim中包含的字符都会被滤掉，并将被滤掉的地方设为一处分割的节点。
具体使用例子：
Download: strtok_sample.c#include &#60;stdio.h&#62;
#include &#60;string.h&#62;
int main(int argc,char **argv)
{
char * buf1=&#34;aaa, ,a, ,,,bbb-c,,,ee&#124;abc&#34;;
/* Establish string and get the first token: */
char* token = strtok(&#160;buf1, &#34;,-&#124;&#34;);
while(&#160;token != NULL )
&#160; &#160; {
/* While there are tokens in &#34;string&#34; */
&#160; &#160; &#160; &#160; printf(&#160;&#34;%s &#34;, token );
/* Get next token: */
&#160; &#160; &#160; &#160; token = [...]]]></description>
		<wfw:commentRss>http://blog.minidx.com/2008/02/03/469.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 2/9 queries in 0.074 seconds using disk
Object Caching 160/320 objects using disk

Served from: blog.minidx.com @ 2012-02-10 01:46:04 -->
