C语言
lou__001
每天一小步,时间久了你会发现你已经走了很远
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
字符串处理://在母串中查找子串,只保留子串之后的数据
//在母串中查找子串,只保留子串之后的数据char * clientDialog::myStrSubFront(char *str,const char *dest){ char *tmpStr = str; // int inde = 0; while(*tmpStr != '\0') { if((*tmpStr) == (*d原创 2017-04-26 11:39:08 · 798 阅读 · 0 评论 -
字符串处理://在母串中查找子串,只保留子串之前的数据
//在母串中查找子串,只保留子串之前的数据char * myStrSubEnd(char *str,const char *dest){ char *tmpStr = str; int inde = 0; while(*tmpStr != '\0') { if((*tmpStr) == (*dest)) {原创 2017-04-26 11:41:24 · 890 阅读 · 0 评论 -
自定义字符串定长大小判断my_strncmp()
int my_strncmp(char*dest,const char *ptr,int n){ int i = 0; while(*ptr != '\0') { if(i == n) { break; } i++;原创 2017-04-26 12:03:36 · 677 阅读 · 0 评论 -
自定义字符串拼接函数my_strcat()
char *my_strcat(char*dest,constchar *ptr){ char *temp = dest; while(*temp != '\0') { temp++; } while(*ptr != '\0') { *temp = *ptr; te原创 2017-04-26 14:39:32 · 2827 阅读 · 0 评论 -
自定义字符串定长拼接函数my_strncat()
char *my_strncat(char*dest,constchar *ptr,intn){ char *temp = dest; while(*temp != '\0') { temp++; } int i = 0; while(*ptr != '\0') { i原创 2017-04-26 14:44:20 · 1166 阅读 · 0 评论 -
自定义字符串定长拷贝函数my_strncpy()
char *my_strncpy(char*dest,constchar *ptr,intn){ char *temp = dest; int i = 0; while(*ptr != '\0') { if(i == n) { break; }原创 2017-04-26 14:59:00 · 929 阅读 · 0 评论 -
从一个图片读数据,由这个数据来填充新建图片文件
FILE * file1;char * szTxt;int nLen;file1 = fopen("f:\\temp\\test.bmp", "rb");fseek(file1, 0, SEEK_END);nLen = ftell(file1);//nlen文件长度fseek(file1, 0, SEEK_SET);szTxt = (char *)malloc(nLen原创 2017-11-16 10:48:21 · 418 阅读 · 0 评论
分享