about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-06-15 19:24:52 +0200
committerSimon Sapin <simon.sapin@exyr.org>2015-07-13 16:21:43 +0200
commit7469914e96a511487e8248d2f8a583befb02149f (patch)
tree3f3b92e8940ad8690a72bb6c9149e79e9bf70b94 /src/libcollections
parentf9005512a9d84f469b30f0d469ccc401607ce64c (diff)
Add str::split_at_mut
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/str.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index 711e2887865..306a8ba3e09 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -793,6 +793,12 @@ impl str {
         core_str::StrExt::split_at(self, mid)
     }
 
+    /// Divide one mutable string slice into two at an index.
+    #[inline]
+    pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
+        core_str::StrExt::split_at_mut(self, mid)
+    }
+
     /// An iterator over the codepoints of `self`.
     ///
     /// # Examples