From 0d88bf7e439ea9f2c51dfb3634b39f65cd7717aa Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 16 Mar 2012 11:58:39 -0700 Subject: [PATCH] core: Escape some characters in comments --- src/libcore/str.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 9fb3517d8cf..fb8acf49a7e 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -517,13 +517,13 @@ fn split_str_nonempty(s: str, sep: str) -> [str] { } #[doc = " -Splits a string into a vector of the substrings separated by LF ('\n') +Splits a string into a vector of the substrings separated by LF ('\\n') "] fn lines(s: str) -> [str] { split_char(s, '\n') } #[doc = " -Splits a string into a vector of the substrings separated by LF ('\n') -and/or CR LF ('\r\n') +Splits a string into a vector of the substrings separated by LF ('\\n') +and/or CR LF ('\\r\\n') "] fn lines_any(s: str) -> [str] { vec::map(lines(s), {|s| @@ -664,7 +664,7 @@ fn words_iter(ss: str, ff: fn(&&str)) { vec::iter(words(ss), ff) } -#[doc = "Apply a function to each lines (by '\n')"] +#[doc = "Apply a function to each lines (by '\\n')"] fn lines_iter(ss: str, ff: fn(&&str)) { vec::iter(lines(ss), ff) }