当前位置:网站首页>(指針)自己寫一個比較字符串大小的函數,功能與strcmp類似。
(指針)自己寫一個比較字符串大小的函數,功能與strcmp類似。
2022-07-04 04:19:00 【我不是蕭海哇~~~~】
int strcmps(const char *s1,const char *s2)
{
while(*s1!='\0'&& *s2!='\0')
{
if(*s1>*s2)
return 1;
else if(*s1<*s2)
return -1;
s1++;
s2++;
}
if(*s1>*s2)
return 1;
else if(*s1<*s2)
return -1;
return 0;
}
边栏推荐
猜你喜欢

Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure

02 specific implementation of LS command

Introduction to asynchronous task capability of function calculation - task trigger de duplication

idea修改主体颜色

Rhcsa-- day one

Graduation project: design seckill e-commerce system

1289_ Implementation analysis of vtask suspend() interface in FreeRTOS

ctf-pikachu-CSRF

ctf-pikachu-CSRF
![CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构](/img/ba/c1d40de154344ccc9f2fd1dd4cb12f.png)
CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
随机推荐
[paddleseg source code reading] paddleseg calculation dice
Perf simple process for multithreaded profile
还原窗口位置的微妙之处
The difference between bagging and boosting in machine learning
三年进账35.31亿,这个江西老表要IPO了
User defined path and file name of Baidu editor in laravel admin
批处理初识
智慧地铁| 云计算为城市地铁交通注入智慧
Pointer array and array pointer
量子力学习题
Katalon中控件的参数化
[book club issue 13] multimedia processing tool ffmpeg tool set
02 ls 命令的具体实现
VIM add interval annotation correctly
软件测试是干什么的 发现缺陷错误,提高软件的质量
Programmers' telecommuting is mixed | community essay solicitation
拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。
毕业设计:设计秒杀电商系统
Introduction to asynchronous task capability of function calculation - task trigger de duplication
leetcode刷题:二叉树05(翻转二叉树)