当前位置:网站首页>Rust: how to match a string?
Rust: how to match a string?
2022-04-23 18:03:00 【Xu Yeping】
Don't talk nonsense , Paste the code directly to see the example !
fn main() {
let s = String::from("hello");
match &s as &str {
"hello" => println!("hello"),
_ => (),
}
}
版权声明
本文为[Xu Yeping]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230544498401.html
边栏推荐
- Clion installation tutorial
- Build openstack platform
- How to install jsonpath package
- MySQL auto start settings start with systemctl start mysqld
- C#字节数组(byte[])和字符串相互转换
- ArcGIS license error -15 solution
- 读取excel,int 数字时间转时间
- Click Cancel to return to the previous page and modify the parameter value of the previous page, let pages = getcurrentpages() let prevpage = pages [pages. Length - 2] / / the data of the previous pag
- Using files to save data (C language)
- Data stream encryption and decryption of C
猜你喜欢
.104History
ArcGIS table to excel exceeds the upper limit, conversion failed
Fashion classification case based on keras
C1 notes [task training part 2]
Operators in C language
MySQL 中的字符串函数
Docker installation MySQL
Re expression régulière
2022 Jiangxi Photovoltaic Exhibition, China Distributed Photovoltaic Exhibition, Nanchang Solar Energy Utilization Exhibition
2022江西储能技术展会,中国电池展,动力电池展,燃料电池展
随机推荐
Scikit learn sklearn 0.18 official document Chinese version
MySQL_ 01_ Simple data retrieval
ES6
The difference between deep copy and shallow copy
Go的Gin框架学习
Realsense selection comparison d455 d435i d415 t265 3D hardware comparison
Detailed deployment of flask project
Selenium + webdriver + chrome realize Baidu to search for pictures
Crawling mobile game website game details and comments (MQ + multithreading)
MySQL_01_简单数据检索
C language input and output (printf and scanf functions, putchar and getchar functions)
.104History
Nodejs安装
C1 notes [task training chapter I]
Format problems encountered in word typesetting
云原生虚拟化:基于 Kubevirt 构建边缘计算实例
Logic regression principle and code implementation
2022 Jiangxi Photovoltaic Exhibition, China Distributed Photovoltaic Exhibition, Nanchang Solar Energy Utilization Exhibition
Selenium + phantom JS crack sliding verification 2
解决允许在postman中写入注释请求接口方法