
linux库函数
Decisiveness
这个作者很懒,什么都没留下…
展开
-
strtok()
strtok()用来将字符串分割成一个个片段。参数s指向欲分割的字符串,参数delim则为分割字符串中包含的所有字符。当strtok()在参数s的字符串中发现参数delim中包含的分割字符时,则会将该字符改为\0 字符。在第一次调用时,strtok()必需给予参数s字符串,往后的调用则将参数s设置成NULL。每次调用成功则返回指向被分割出片段的指针。 #include #include #i转载 2016-02-17 16:52:58 · 1115 阅读 · 0 评论 -
get the current system time and print it
#include #include int main(void) { time_t timep; time(&timep); printf("the current time: %s\n", ctime(&timep)); } the result: the current time: Fri Feb 19 17:26:53 2原创 2016-02-18 17:26:30 · 378 阅读 · 0 评论