当前位置:网站首页>力扣------替换空格
力扣------替换空格
2022-06-30 06:25:00 【qq_37760746】

char* replaceSpace(char* s){
int len =strlen(s);
char* s1=(char*)calloc(2000,sizeof(char));
int count=0;
for(int a=0;a<len;a++){
if(s[a]!=' '){
s1[count++]=s[a];
}
else{
s1[count++]='%';
s1[count++]='2';
s1[count++]='0';
}
}
s1[count]='\0';
return s1;
}
边栏推荐
- Prototype and prototype chain in JS
- Zibll子比主题V6.4.1wordpress 开心版源码下载_破解原版/直接使用/无需教程
- MySQL summary
- Mysql database learning notes - foreign keys, table connections, subqueries, and indexes for MySQL multi table queries
- Multithreading advanced level
- Résoudre le problème de décompiler la compilation normale
- Practice summary of Prometheus project in amu Laboratory
- 股票在网上开户安全吗?在网上能不能开户炒股呢?
- ini解析学习文档
- Intelligent question - horse racing question
猜你喜欢

Zibll子比主题V6.4.1wordpress 开心版源码下载_破解原版/直接使用/无需教程

Detailed description of methods in the interface

Base64 explanation: playing with pictures Base64 encoding

观察者模式、状态模式在实际工作中的使用

图像处理7-图像增强

C language final experiment report (student achievement management system) source code

多线程进阶篇

图片。。。。。

Using C language pure for loop to implement ilovey

Loading class `com. mysql. jdbc. Driver‘. This is deprecated. The new driver class is `com. mysql. cj. jdb
随机推荐
Wechat applet mall project
ES6扩展运算符(...)
Unable to read file for extraction: gdx64. dll
Arrangement of in-depth learning materials
我做功能测试这么多年的心得
ES6 extended operator (...)
Common address collection
General contents of learning reinforcement learning
When to use redis
2020-10-06
Control method of UAV formation
Several commands not commonly used in MySQL
Collections tool class (V)
反编译正常回编译出现问题自己解决办法
Jgaurora A8 configuration file
Talking about the struct of go
Improve simulation speed during ROS and Px4 joint simulation
图像处理7-图像增强
880. 索引处的解码字符串
Go common judgments