「Rust筆記」修訂間的差異

出自Tan Kian-ting的維基
跳至導覽 跳至搜尋
行 12: 行 12:
==函數==
==函數==
# 得到 UTF-8 字串長度的方法:[https://docs.rs/unicode-segmentation/1.6.0/unicode_segmentation/index.html UnicodeSegmentation::graphemes](參見:[https://stackoverflow.com/questions/46290655/get-the-string-length-in-characters-in-rust Stack Overflow])
# 得到 UTF-8 字串長度的方法:[https://docs.rs/unicode-segmentation/1.6.0/unicode_segmentation/index.html UnicodeSegmentation::graphemes](參見:[https://stackoverflow.com/questions/46290655/get-the-string-length-in-characters-in-rust Stack Overflow])
[[category:資訊]]

於 2022年3月5日 (六) 22:37 的修訂

型別

函數

struct

struct Aminal {
    species: String,
    name: String,
    weight: u64,
}

函數

  1. 得到 UTF-8 字串長度的方法:UnicodeSegmentation::graphemes(參見:Stack Overflow