StringJoiner.Merge(StringJoiner) Method

Definition

Adds the contents of the given StringJoiner without prefix and suffix as the next element if it is non-empty.

[Android.Runtime.Register("merge", "(Ljava/util/StringJoiner;)Ljava/util/StringJoiner;", "", ApiSince=24)]
public Java.Util.StringJoiner? Merge (Java.Util.StringJoiner? other);
[<Android.Runtime.Register("merge", "(Ljava/util/StringJoiner;)Ljava/util/StringJoiner;", "", ApiSince=24)>]
member this.Merge : Java.Util.StringJoiner -> Java.Util.StringJoiner

Parameters

other
StringJoiner

The StringJoiner whose contents should be merged into this one

Returns

This StringJoiner

Attributes

Remarks

Adds the contents of the given StringJoiner without prefix and suffix as the next element if it is non-empty. If the given StringJoiner is empty, the call has no effect.

A StringJoiner is empty if #add(CharSequence) add() has never been called, and if merge() has never been called with a non-empty StringJoiner argument.

If the other StringJoiner is using a different delimiter, then elements from the other StringJoiner are concatenated with that delimiter and the result is appended to this StringJoiner as a single element.

Java documentation for java.util.StringJoiner.merge(java.util.StringJoiner).

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