Language

ULocale.Builder.SetVariant(String) Method

Definition

Sets the variant.

[Android.Runtime.Register("setVariant", "(Ljava/lang/String;)Landroid/icu/util/ULocale$Builder;", "", ApiSince=24)]
public Android.Icu.Util.ULocale.Builder SetVariant(string variant);
[<Android.Runtime.Register("setVariant", "(Ljava/lang/String;)Landroid/icu/util/ULocale$Builder;", "", ApiSince=24)>]
member this.SetVariant : string -> Android.Icu.Util.ULocale.Builder

Parameters

variant
String

the variant

Returns

This builder.

Attributes

Remarks

Sets the variant. If variant is null or the empty string, the variant in this Builder is removed. Otherwise, it must consist of one or more well-formed subtags, or an exception is thrown.

Note: This method checks if variant satisfies the IETF BCP 47 variant subtag's syntax requirements, and normalizes the value to lowercase letters. However, the ULocale class does not impose any syntactic restriction on variant. To set such a variant, use a ULocale constructor.

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

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