Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1666dc60 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Combine list of CharSequence with delimeter."

parents 01675902 fa4d7754
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -258,6 +258,17 @@ public class TextUtils {
        return ret;
    }

    /**
     * Returns list of multiple {@link CharSequence} joined into a single
     * {@link CharSequence} separated by localized delimiter such as ", ".
     *
     * @hide
     */
    public static CharSequence join(Iterable<CharSequence> list) {
        final CharSequence delimiter = Resources.getSystem().getText(R.string.list_delimeter);
        return join(delimiter, list);
    }

    /**
     * Returns a string containing the tokens joined by delimiters.
     * @param tokens an array objects to be joined. Strings will be formed from
+3 −0
Original line number Diff line number Diff line
@@ -3153,4 +3153,7 @@
    <!-- Description of for the status bar's icon that the device is locked for accessibility. [CHAR LIMIT=NONE] -->
    <string name="status_bar_device_locked">Device locked.</string>

    <!-- Delimeter used between each item in a textual list; for example "Alpha, Beta". [CHAR LIMIT=3] -->
    <string name="list_delimeter">", "</string>

</resources>