about summary refs log tree commit diff
path: root/doc/tutorial.md
diff options
context:
space:
mode:
authorMarvin Löbel <loebel.marvin@gmail.com>2013-03-21 22:59:33 +0100
committerMarvin Löbel <loebel.marvin@gmail.com>2013-03-21 23:06:04 +0100
commitee2f3d9673407db3ca5a0eb24e01ef52c7fc676c (patch)
treef85fe06cfa6bfab47ddfe9c55e9c91c2a67495d6 /doc/tutorial.md
parented25a674ac6bc53c9ee9f8c1cce21541f6811d4b (diff)
downloadrust-ee2f3d9673407db3ca5a0eb24e01ef52c7fc676c.tar.gz
rust-ee2f3d9673407db3ca5a0eb24e01ef52c7fc676c.zip
Switched over substr and trim functions in str to be non-allocating, temporary renamed them to better track use-sites
Diffstat (limited to 'doc/tutorial.md')
-rw-r--r--doc/tutorial.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md
index 699fc33863a..56b7d3695ae 100644
--- a/doc/tutorial.md
+++ b/doc/tutorial.md
@@ -1363,11 +1363,11 @@ let crayon_names = crayons.map(|v| crayon_to_str(*v));
 let favorite_crayon_name = crayon_names[0];
 
 // Remove whitespace from before and after the string
-let new_favorite_crayon_name = favorite_crayon_name.trim();
+let new_favorite_crayon_name = favorite_crayon_name.trim_DBGBRWD();
 
 if favorite_crayon_name.len() > 5 {
    // Create a substring
-   println(favorite_crayon_name.substr(0, 5));
+   println(favorite_crayon_name.substr_DBGBRWD(0, 5));
 }
 ~~~