狡兔第二窟

網路,每個人都是狡兔

2007年12月7日 星期五

C string split function





函數名: strtok
功 能: 查找由在第二個串中指定的分界符分隔開的單詞
用 法: char *strtok(char *str1, char *str2);
程序例:

#include
#include

int main(void)
{
char input[16] = "abc,d";
char *p;

/**//* strtok places a NULL terminator
in front of the token, if found */
p = strtok(input, ",");
if (p) printf("%s\n", p);

/**//* A second call to strtok using a NULL
as the first parameter returns a pointer
to the character following the token */
p = strtok(NULL, ",");
if (p) printf("%s\n", p);
return 0;
}



張貼者: 搖頭晃腦的兔子 於 下午6:25
標籤: project work

沒有留言:

張貼留言

較新的文章 較舊的文章 首頁
訂閱: 張貼留言 (Atom)

New Vistor Map

關於我自己

搖頭晃腦的兔子
檢視我的完整簡介

標籤

八卦 (12) 工作 (3) 天兵 (1) 日本 (3) 日本 工作 (1) 日本生活 (5) 正庤 (2) 生活 (17) 我的人生 (22) 知識 (5) 金門 (1) 阿扁 (1) 美食 (1) 旅行 (1) 陳小柔 (2) 減重 (1) 筆記 windows (1) 亂象 (8) 愛台灣 (1) 感想 (11) 照片 (6) 腦殘 (3) 運動 (3) 演講 (1) ati (1) fedora (2) Life (9) linux (3) Movies (1) project work (3)

狡兔結黨

  • 大智若瑜
  • 狡兔寫真
  • 狡兔第一窟
Powered By Blogger

網誌存檔

  • ►  2019 (4)
    • ►  6月 (1)
    • ►  4月 (1)
    • ►  3月 (2)
  • ►  2018 (3)
    • ►  9月 (1)
    • ►  7月 (1)
    • ►  3月 (1)
  • ►  2017 (3)
    • ►  11月 (1)
    • ►  8月 (2)
  • ►  2016 (2)
    • ►  7月 (2)
  • ►  2015 (4)
    • ►  8月 (1)
    • ►  6月 (1)
    • ►  5月 (1)
    • ►  1月 (1)
  • ►  2014 (7)
    • ►  11月 (1)
    • ►  10月 (4)
    • ►  5月 (2)
  • ►  2013 (3)
    • ►  10月 (1)
    • ►  5月 (2)
  • ►  2012 (3)
    • ►  10月 (1)
    • ►  7月 (1)
    • ►  3月 (1)
  • ►  2010 (2)
    • ►  2月 (2)
  • ►  2009 (10)
    • ►  9月 (1)
    • ►  8月 (2)
    • ►  7月 (2)
    • ►  6月 (1)
    • ►  2月 (3)
    • ►  1月 (1)
  • ►  2008 (33)
    • ►  12月 (2)
    • ►  11月 (1)
    • ►  10月 (1)
    • ►  9月 (7)
    • ►  8月 (5)
    • ►  7月 (4)
    • ►  6月 (3)
    • ►  5月 (4)
    • ►  4月 (2)
    • ►  3月 (1)
    • ►  2月 (1)
    • ►  1月 (2)
  • ▼  2007 (14)
    • ▼  12月 (2)
      • C string split function
      • I love and hate MSN...
    • ►  11月 (1)
    • ►  10月 (1)
    • ►  8月 (1)
    • ►  5月 (4)
    • ►  4月 (3)
    • ►  3月 (2)

搜尋此網誌

訂閱

發表文章
Atom
發表文章
留言
Atom
留言
輕柔雅緻主題. 技術提供:Blogger.