commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TEXT-95) Convenience formatting method in ExtendedMethodFormat
Date Fri, 08 Dec 2017 19:05:00 GMT

     [ https://issues.apache.org/jira/browse/TEXT-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Tompkins updated TEXT-95:
-----------------------------
    Affects Version/s: 1.1

> Convenience formatting method in ExtendedMethodFormat
> -----------------------------------------------------
>
>                 Key: TEXT-95
>                 URL: https://issues.apache.org/jira/browse/TEXT-95
>             Project: Commons Text
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Arend v. Reinersdorff
>             Fix For: 1.x
>
>
> It would be nice to have a simple formatting method in ExtendedMethodFormat:
> {code}
> String format(Object... arguments)
> {code}
> Intended use:
> {code}
> ExtendedMessageFormat messageFormat = new ExtendedMessageFormat("{0}, {1}", Locale.ROOT);
> String output = messageFormat.format("Hello", "World");
> {code}
> The current formatting method of (Extended)MethodFormat is quite inconvenient for simple
use cases:
> {code}
> ExtendedMessageFormat messageFormat = new ExtendedMessageFormat("{0}, {1}", Locale.ROOT);
> Object[] arguments = { "Hello", "World" };
> StringBuffer outputBuffer = messageFormat.format(arguments, new StringBuffer(), null);
> String output = outputBuffer.toString();
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message