We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92e9e70 commit a9dbb79Copy full SHA for a9dbb79
src/libcollections/string.rs
@@ -857,6 +857,16 @@ impl<'a, S: Str> Equiv<S> for String {
857
858
#[experimental = "waiting on Add stabilization"]
859
impl<S: Str> Add<S, String> for String {
860
+ /// Concatenates `self` and `other` as a new mutable `String`.
861
+ ///
862
+ /// # Examples
863
864
+ /// ```
865
+ /// let string1 = "foo".to_string();
866
+ /// let string2 = "bar".to_string();
867
+ /// let string3 = string1 + string2;
868
+ /// assert_eq!(string3, "foobar".to_string());
869
870
fn add(&self, other: &S) -> String {
871
let mut s = String::from_str(self.as_slice());
872
s.push_str(other.as_slice());
0 commit comments