Language

ULocale.Builder.SetExtension(Char, String) Method

Definition

Sets the extension for the given key.

[Android.Runtime.Register("setExtension", "(CLjava/lang/String;)Landroid/icu/util/ULocale$Builder;", "", ApiSince=24)]
public Android.Icu.Util.ULocale.Builder SetExtension(char key, string value);
[<Android.Runtime.Register("setExtension", "(CLjava/lang/String;)Landroid/icu/util/ULocale$Builder;", "", ApiSince=24)>]
member this.SetExtension : char * string -> Android.Icu.Util.ULocale.Builder

Parameters

key
Char

the extension key

value
String

the extension value

Returns

This builder.

Attributes

Remarks

Sets the extension for the given key. If the value is null or the empty string, the extension is removed. Otherwise, the extension must be well-formed or an exception is thrown.

Note: The key UNICODE_LOCALE_EXTENSION ('u') is used for the Unicode locale extension. Setting a value for this key replaces any existing Unicode locale key/type pairs with those defined in the extension.

Note: The key PRIVATE_USE_EXTENSION ('x') is used for the private use code. To be well-formed, the value for this key needs only to have subtags of one to eight alphanumeric characters, not two to eight as in the general case.

Android reference for android.icu.util.ULocale.Builder.setExtension.

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