当前位置:网站首页>C language learning log 12.25
C language learning log 12.25
2022-06-13 04:57:00 【Today is also a day without baldness】
String function
include<string.h>
(1)strlen: strlen( String name )——— Represents the length of the string , Not including the ending "\0".
(2)strcmp: int strcmp(const char*s1,const char *s2)—— To compare these two strings , return :(1).s1==s2:0;(2).s1>s2:1;(3).s1<s2:-1
(3)strcpy: char*strcpy(char *restrict dst, const char*restrict src)——— Used to handle src Copy characters of to dst,restrict indicate src and dst No overlap , In the end, it's back dst
(4)strcat:char *strcat(char*restrict s1,const char *restrict s2)—— hold s2 copy to s1 Behind , Take a long string , return s1,s1 There must be enough space
among (2)(3) (4) Add... In the middle n, such as strncpy(char *restrict dst, const char*restrict src,size_t n);—— To copy n Advance in dst.
(5)strchr:char * strchr(const char*s,c);—— Look for... From the left , Used to find... In a string c character .strrchr: It's from the right .
边栏推荐
- [JS solution] leedcode 200 Number of islands
- [try to hack] upload labs (temporarily write to 12)
- Your one-on-one meetings are inefficient. You can do this!
- E - Lucky Numbers
- Opencv image storage and reading
- Clause 32: moving objects into closures using initialization capture objects
- 利用Javeswingjdbc基于mvc设计系统
- OpenCV中的saturate操作(饱和操作)究竟是怎么回事
- Configuration used by automatic teaching evaluation script
- Section 7 - structures
猜你喜欢

QT realizes message sending and file transmission between client and server

Advantages of win8.1 and win10

Simple-SR:Best-Buddy GANs for Highly Detailed Image Super-Resolution论文浅析

Shell built-in string substitution

利用Javeswingjdbc基于mvc设计系统

PowerShell plus domain add computer module

Section 7 - structures

2021tami/ image processing: exploiting deep generative priority for versatile image restoration and manipulation

Stepping on a horse (one stroke)

Section 5 - Operator details
随机推荐
2022年建筑架子工(建筑特殊工种)特种作业证考试题库及在线模拟考试
D 小红的构造题
Section 8 - Practical commissioning techniques
About mission planning and improving execution
Advantages of win8.1 and win10
josephus problem
Section 3 - functions
Explain the differences and usage scenarios between created and mounted
shell变量学习笔记
Shell variable learning notes
Collection of some compatibility issues
Handwritten promise and its method, with detailed notes
无限循环滚动代码阿里巴巴国际站店铺装修代码底图滚动黑色半透明显示效果自定义内容装修代码全屏显示
QT direction key to move focus
Interpretation of QT keypressevent
Vercel uses HTTP caching
Blockly learning ----1 Work area, block, toolbox
Section 4 - arrays
Regular expressions in QT
Implementing the driver registration initcall mechanism on stm32