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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user