摘要:
strstr可以实现寻找子字符串的功能 头文件为<string.h> char * strstr ( const char *str1, const char *str2 ); 返回内容 Returns a pointer to the first occurrence of str2 in str 阅读全文
posted @ 2025-11-21 22:11
好想成为人类啊
阅读(11)
评论(0)
推荐(0)
摘要:
strcmp作用是比较两个字符串 是按照内容比,就是ASCII码值比较,逐对比较 This function starts comparing the first character of each string. If they are equal to each other, it contin 阅读全文
posted @ 2025-11-21 12:08
好想成为人类啊
阅读(5)
评论(0)
推荐(0)
摘要:
strcat是字符串追加,可以在目标字符串后加上源字符串 char *strcat(char *Destination,const char *Source); 我们来模拟实现一下 #include<stdio.h> #include<assert.h> char* my_strcat(char* 阅读全文
posted @ 2025-11-21 11:00
好想成为人类啊
阅读(6)
评论(0)
推荐(0)
摘要:
strcpy的作用是复制字符串,将源字符串复制到目标字符串,返回值会返回目标字符串 头文件为<string.h> char *strcpy(char *strDestination,const char *strSource); 下面我们来模拟实现一下strcpy的功能 //赋值表达式的值就是赋值操 阅读全文
posted @ 2025-11-21 10:22
好想成为人类啊
阅读(3)
评论(0)
推荐(0)

浙公网安备 33010602011771号