Using String::formatted with Strings


#1

I asked this over at the old forum, but it didn’t make it over to the new forum.

What is the correct way to use String::formatted with other strings? I go like this:

String foo(T(“foo”));
String::formatted(T("%s"), (const tchar*)foo);

This works fine on my pc build, but doesn’t seem to work on the mac, as it seems to be expecting a char* not a wchar*.


#2

This also affects Time::toString() as am/pm don’t show up on the mac


#3

Interesting… ok, I can sort that one out. Not really much I can do about the more general case though, as it relies on the platform’s own printf formatting code.


#4