MessageFormat.Format Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Format(String, Object[]) |
Formats an array of objects and appends the <code>MessageFormat</code>'s pattern, with format elements replaced by the formatted objects, to the provided <code>StringBuffer</code>. |
| Format(Object, StringBuffer, FieldPosition) |
Formats an array of objects and appends the <code>MessageFormat</code>'s pattern, with format elements replaced by the formatted objects, to the provided <code>StringBuffer</code>. |
| Format(Object[], StringBuffer, FieldPosition) |
Formats an array of objects and appends the <code>MessageFormat</code>'s pattern, with format elements replaced by the formatted objects, to the provided <code>StringBuffer</code>. |
Format(String, Object[])
Formats an array of objects and appends the <code>MessageFormat</code>'s pattern, with format elements replaced by the formatted objects, to the provided <code>StringBuffer</code>.
[Android.Runtime.Register("format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "")]
public static string? Format (string? pattern, params Java.Lang.Object[]? arguments);
[<Android.Runtime.Register("format", "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "")>]
static member Format : string * Java.Lang.Object[] -> string
Parameters
- pattern
- String
- arguments
- Object[]
an array of objects to be formatted and substituted.
Returns
- Attributes
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
Format(Object, StringBuffer, FieldPosition)
Formats an array of objects and appends the <code>MessageFormat</code>'s pattern, with format elements replaced by the formatted objects, to the provided <code>StringBuffer</code>.
[Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")]
public override sealed Java.Lang.StringBuffer? Format (Java.Lang.Object? arguments, Java.Lang.StringBuffer? result, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")>]
override this.Format : Java.Lang.Object * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer
Parameters
- arguments
- Object
an array of objects to be formatted and substituted.
- result
- StringBuffer
where text is appended.
- pos
- FieldPosition
On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns
- Attributes
Exceptions
if object is not an array of Object.
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
Format(Object[], StringBuffer, FieldPosition)
Formats an array of objects and appends the <code>MessageFormat</code>'s pattern, with format elements replaced by the formatted objects, to the provided <code>StringBuffer</code>.
[Android.Runtime.Register("format", "([Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")]
public Java.Lang.StringBuffer? Format (Java.Lang.Object[]? arguments, Java.Lang.StringBuffer? result, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "([Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")>]
override this.Format : Java.Lang.Object[] * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer
Parameters
- arguments
- Object[]
an array of objects to be formatted and substituted.
- result
- StringBuffer
where text is appended.
- pos
- FieldPosition
On input: an alignment field, if desired. On output: the offsets of the alignment field.
Returns
- Attributes
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.