IFormattable.FormatTo(Formatter, FormatFlags, Int32, Int32) IFormattable.FormatTo(Formatter, FormatFlags, Int32, Int32) Method

Definition

Formats the object using the specified Formatter.

[Android.Runtime.Register("formatTo", "(Ljava/util/Formatter;III)V", "GetFormatTo_Ljava_util_Formatter_IIIHandler:Java.Util.IFormattableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void FormatTo (Java.Util.Formatter formatter, Java.Util.FormatFlags flags, int width, int precision);
abstract member FormatTo : Java.Util.Formatter * Java.Util.FormatFlags * int * int -> unit

Parameters

formatter
Formatter Formatter

the Formatter to use.

flags
FormatFlags FormatFlags

the flags applied to the output format, which is a bitmask that is any combination of FormattableFlags.LEFT_JUSTIFY, FormattableFlags.UPPERCASE, and FormattableFlags.ALTERNATE. If no such flag is set, the output is formatted by the default formatting of the implementation.

width
Int32 Int32

the minimum number of characters that should be written to the output. If the length of the converted value is less than width Additional space characters (' ') are added to the output if the as needed to make up the difference. These spaces are added at the beginning by default unless the flag FormattableFlags.LEFT_JUSTIFY is set, which denotes that padding should be added at the end. If width is -1, then minimum length is not enforced.

precision
Int32 Int32

the maximum number of characters that can be written to the output. The length of the output is trimmed down to this size before the width padding is applied. If the precision is -1, then maximum length is not enforced.

Exceptions

if any of the parameters is not supported.

Remarks

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