Partager via


MeasureUnit.ForIdentifier(String) Method

Definition

Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS 35.

[Android.Runtime.Register("forIdentifier", "(Ljava/lang/String;)Landroid/icu/util/MeasureUnit;", "", ApiSince=33)]
public static Android.Icu.Util.MeasureUnit? ForIdentifier (string? identifier);
[<Android.Runtime.Register("forIdentifier", "(Ljava/lang/String;)Landroid/icu/util/MeasureUnit;", "", ApiSince=33)>]
static member ForIdentifier : string -> Android.Icu.Util.MeasureUnit

Parameters

identifier
String

CLDR Unit Identifier

Returns

Attributes

Remarks

Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS 35. (Core unit identifiers and mixed unit identifiers are supported, long unit identifiers are not.) Validates and canonicalizes the identifier.

Note: dimensionless MeasureUnit is null

MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")

Java documentation for android.icu.util.MeasureUnit.forIdentifier(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