Share via


PluralFormat.Format Method

Definition

Overloads

Format(Object, StringBuffer, FieldPosition)

Formats a plural message for a given number and appends the formatted message to the given StringBuffer.

Format(Double)

Formats a plural message for a given number.

Format(Object, StringBuffer, FieldPosition)

Formats a plural message for a given number and appends the formatted message to the given StringBuffer.

[Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_lang_Object_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public override Java.Lang.StringBuffer? Format (Java.Lang.Object? number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_lang_Object_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : Java.Lang.Object * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
Object

a number object (instance of Number for which the plural message should be formatted. If no pattern has been applied to this PluralFormat object yet, the formatted number will be returned. Note: If this object is not an instance of Number, the toAppendTo will not be modified.

toAppendTo
StringBuffer

the formatted message will be appended to this StringBuffer.

pos
FieldPosition

will be ignored by this method.

Returns

the string buffer passed in as toAppendTo, with formatted text appended.

Attributes

Remarks

Formats a plural message for a given number and appends the formatted message to the given StringBuffer.

Java documentation for android.icu.text.PluralFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(Double)

Formats a plural message for a given number.

[Android.Runtime.Register("format", "(D)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (double number);
[<Android.Runtime.Register("format", "(D)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : double -> string

Parameters

number
Double

a number for which the plural message should be formatted. If no pattern has been applied to this PluralFormat object yet, the formatted number will be returned.

Returns

the string containing the formatted plural message.

Attributes

Remarks

Formats a plural message for a given number.

Java documentation for android.icu.text.PluralFormat.format(double).

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