Fix built-in wxPrintf() for repeated positional parameters
Allow wxPrintf("%1$s %1$s", "foo") to work.
Take into account the possibility that the number of format specifiers
and the number of actual arguments can be different.
Closes #9367.
This commit is contained in:
parent
dd8155980b
commit
471a771382
3 changed files with 36 additions and 10 deletions
|
|
@ -188,6 +188,8 @@ void StringTestCase::Format()
|
|||
"4 world hello world 3",
|
||||
wxString::Format("%4$d %2$s %1$s %2$s %3$d", "hello", "world", 3, 4)
|
||||
);
|
||||
|
||||
CHECK( wxString::Format("%1$o %1$d %1$x", 20) == "24 20 14" );
|
||||
}
|
||||
|
||||
void StringTestCase::FormatUnicode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue