On Jan 21, 8:58 am, Diego Torres Milano <[email protected]> wrote:
> Use:
>
> String.format("It is %d and %<d again!", 10)
yes. or, if you want $, use it like this:
String.format("%2$s %1$s", "world", "hello")
the two ("<" and "$") are mutually exclusive, and you still need to
provide a conversion type ("d" or "s" or whatever).
our documentation is wrong, and i'll fix it. thanks for pointing this
out!
(btw, in future please provide the exact exception that's thrown, both
to help people answer your question and for the benefit of others who
have the same problem in future.)
--elliott
> On Jan 21, 3:37 am, Farproc <[email protected]> wrote:
>
> >http://d.android.com/reference/java/util/Formatter.html
> > In the doc above there is "The two characters <$ immediately following
> > the % sign indicate that the previous value should be used again
> > instead of moving on to the next value argument".
> > I tested it as "String.format("It is %d and %<$ again!", 10)" but it
> > throws. Any idea?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en