compound-types/string #198
Replies: 45 comments 17 replies
-
| 第10题您要求修改以下代码行,但实际上是要把上面一行的 fn main() {
    let raw_str = r"Escapes don't work here: \x3F \u{211D}";
    // 修改以下代码行,让它工作
    assert_eq!(raw_str, "Escapes don't work here: ? ℝ");
    // 如果你希望在字符串中使用双引号,可以使用以下形式
    let quotes = r#"And then I said: "There is no escape!""#;
    println!("{}", quotes);
    // 如果希望在字符串中使用 # 号,可以如下使用:
    let  delimiter = r###"A string with "# in it. And even "##!"###;
    println!("{}", delimiter);
    // 填空
    let long_delimiter = __;
    assert_eq!(long_delimiter, "Hello, \"##\"")
} | 
Beta Was this translation helpful? Give feedback.
-
| Done. | 
Beta Was this translation helpful? Give feedback.
-
|  | 
Beta Was this translation helpful? Give feedback.
-
| done! 很棒的练习题,其中几个例子也帮助我们对于字符串和切片有了更深刻的了解 | 
Beta Was this translation helpful? Give feedback.
-
| done! | 
Beta Was this translation helpful? Give feedback.
-
| 第8题的答案是无法通过编译的,因为s1 没被使用 | 
Beta Was this translation helpful? Give feedback.
-
| utf8_slice Example 不能执行也不能修改 | 
Beta Was this translation helpful? Give feedback.
-
| 2022.11.11 Done | 
Beta Was this translation helpful? Give feedback.
-
| Done! | 
Beta Was this translation helpful? Give feedback.
-
| mark | 
Beta Was this translation helpful? Give feedback.
-
| utf8_slice 的 Example 不能正常编译:  | 
Beta Was this translation helpful? Give feedback.
-
| Done。连着做十几道题好累,昏昏沉沉快做睡着了。 | 
Beta Was this translation helpful? Give feedback.
-
| 第10题直接猪脑过载 | 
Beta Was this translation helpful? Give feedback.
-
| passed | 
Beta Was this translation helpful? Give feedback.
-
| mark | 
Beta Was this translation helpful? Give feedback.
-
| 感觉做课后作业的人不多啊。 | 
Beta Was this translation helpful? Give feedback.
-
| 
 | 
Beta Was this translation helpful? Give feedback.
-
| Done | 
Beta Was this translation helpful? Give feedback.
-
| done | 
Beta Was this translation helpful? Give feedback.
-
| done~~~ | 
Beta Was this translation helpful? Give feedback.
-
| 第三题我出现了一些错误,在Windows平台使用gnu工具链时出现了以下错误: error: could not compile  经过初步排查,似乎是由于s.push('!');引起的(因为我改成s.push_str('!');就可以成功运行了 | 
Beta Was this translation helpful? Give feedback.
-
| // 使用至少两种方法来修复错误 fn greetings(s: &str) { | 
Beta Was this translation helpful? Give feedback.
-
| mark finished | 
Beta Was this translation helpful? Give feedback.
-
| 第2題 fn greetings(s: &str) { 以上是我說服自己的過程,希望大佬們指出錯誤,越多越好,感激不盡,腦子不夠用了Zzzz | 
Beta Was this translation helpful? Give feedback.
-
| done | 
Beta Was this translation helpful? Give feedback.
-
| damn bruh, this exercise is tough to understand initially but is rewarding | 
Beta Was this translation helpful? Give feedback.
-
| done | 
Beta Was this translation helpful? Give feedback.
-
| day2 | 
Beta Was this translation helpful? Give feedback.
-
| done | 
Beta Was this translation helpful? Give feedback.
-
| let long_delimiter = r###"hello, "##""###; | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
compound-types/string
Learning Rust By Practice, narrowing the gap between beginner and skilled-dev with challenging examples, exercises and projects.
https://zh.practice.rs/compound-types/string.html
Beta Was this translation helpful? Give feedback.
All reactions