当前位置:网站首页>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
边栏推荐
- MySQL_ 01_ Simple data retrieval
- Go语言JSON包使用
- Detailed deployment of flask project
- C1 notes [task training part 2]
- Implementation of k8s redis one master multi slave dynamic capacity expansion
- Timestamp to formatted date
- Oil monkey website address
- Docker 安装 Redis
- Classes and objects
- [UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (1)
猜你喜欢
Clion installation tutorial
Welcome to the markdown editor
YOLOv4剪枝【附代码】
Visualization of residential house prices
Auto.js 自定义对话框
2022江西光伏展,中国分布式光伏展会,南昌太阳能利用展
Solving the problem of displaying too many unique values in ArcGIS partition statistics failed
Operation of 2022 mobile crane driver national question bank simulation examination platform
.105Location
7-21 wrong questions involve knowledge points.
随机推荐
ROS package NMEA_ navsat_ Driver reads GPS and Beidou Positioning Information Notes
Halo open source project learning (II): entity classes and data tables
C#字节数组(byte[])和字符串相互转换
C language to achieve 2048 small game direction merging logic
Crawl the product data of cicada mother data platform
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
Yolov4 pruning [with code]
2022 Shanghai safety officer C certificate operation certificate examination question bank and simulation examination
Remember using Ali Font Icon Library for the first time
Nat commun | current progress and open challenges of applied deep learning in Bioscience
Operators in C language
Process management command
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
C1 notes [task training part 2]
Data stream encryption and decryption of C
SSD硬盘SATA接口和M.2接口区别(详细)总结
journal
.105Location
String function in MySQL
.105Location