다음을 통해 공유


String.Concat(String) Method

Definition

Concatenates the specified string to the end of this string.

[Android.Runtime.Register("concat", "(Ljava/lang/String;)Ljava/lang/String;", "")]
public string Concat (string str);
[<Android.Runtime.Register("concat", "(Ljava/lang/String;)Ljava/lang/String;", "")>]
member this.Concat : string -> string

Parameters

str
String

the String that is concatenated to the end of this String.

Returns

a string that represents the concatenation of this object's characters followed by the string argument's characters.

Attributes

Remarks

Concatenates the specified string to the end of this string.

If the length of the argument string is 0, then this String object is returned. Otherwise, a String object is returned that represents a character sequence that is the concatenation of the character sequence represented by this String object and the character sequence represented by the argument string.

Examples: <blockquote>

"cares".concat("s") returns "caress"
            "to".concat("get").concat("her") returns "together"

</blockquote>

Java documentation for java.lang.String.concat(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to