当前位置:网站首页>(指針)自己寫一個比較字符串大小的函數,功能與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;
}
边栏推荐
- 如何有效远程办公之我见 | 社区征文
- Deep thinking on investment
- Katalon框架测试web(二十一)获取元素属性断言
- Interpretation of leveldb source code skiplist
- Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
- vue多级路由嵌套怎么动态缓存组件
- Lnk2038 detected a mismatch of "runtimelibrary": the value "md_dynamicrelease" does not match the value "mdd_dynamicdebug" (in main.obj)
- [paddleseg source code reading] normalize operation of paddleseg transform
- Flink学习6:编程模型
- pytest多进程/多线程执行测试用例
猜你喜欢

DP83848+网线热拔插

Perf simple process for multithreaded profile

用于TCP协议交互的TCPClientDemo

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

Tcpclientdemo for TCP protocol interaction

The difference between bagging and boosting in machine learning

Evolution of MySQL database architecture

I Build a simple microservice project

pytest多进程/多线程执行测试用例

Flink学习7:应用程序结构
随机推荐
Parameterization of controls in katalon
LevelDB源码解读-SkipList
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
Pytest multi process / multi thread execution test case
[paddleseg source code reading] paddleseg calculation dice
02 specific implementation of LS command
深度优先搜索简要讲解(附带基础题)
Unity 绘制弹球和台球的运动轨迹
(指针)自己写一个比较字符串大小的函数,功能与strcmp类似。
智慧地铁| 云计算为城市地铁交通注入智慧
VIM add interval annotation correctly
leetcode刷题:二叉树06(对称二叉树)
Interpretation of leveldb source code skiplist
疫情来袭--远程办公之思考|社区征文
ctf-pikachu-XSS
Sales management system of lightweight enterprises based on PHP
Database SQL statement summary, continuous update
量子力学习题
【webrtc】m98 ninja 构建和编译指令
leetcode刷题:二叉树09(二叉树的最小深度)