diff --git a/en/src/compound-types/string.md b/en/src/compound-types/string.md index 57b2d32..403dbdb 100644 --- a/en/src/compound-types/string.md +++ b/en/src/compound-types/string.md @@ -152,9 +152,9 @@ fn main() { ```rust,editable +/* Fill in the blank and fix the errors */ fn main() { let raw_str = r"Escapes don't work here: \x3F \u{211D}"; - // modify below line to make it work assert_eq!(raw_str, "Escapes don't work here: ? ℝ"); // If you need quotes in a raw string, add a pair of #s @@ -166,7 +166,6 @@ fn main() { let delimiter = r###"A string with "# in it. And even "##!"###; println!("{}", delimiter); - // fill the blank let long_delimiter = __; assert_eq!(long_delimiter, "Hello, \"##\""); diff --git a/zh-CN/src/compound-types/string.md b/zh-CN/src/compound-types/string.md index 989b65b..d380256 100644 --- a/zh-CN/src/compound-types/string.md +++ b/zh-CN/src/compound-types/string.md @@ -146,10 +146,9 @@ fn main() { 10. 🌟🌟🌟 有时候需要转义的字符很多,我们会希望使用更方便的方式来书写字符串: raw string. ```rust,editable - +/* 填空并修复所有错误 */ fn main() { let raw_str = r"Escapes don't work here: \x3F \u{211D}"; - // 修改以下代码行,让它工作 assert_eq!(raw_str, "Escapes don't work here: ? ℝ"); // 如果你希望在字符串中使用双引号,可以使用以下形式