[haiku-development] Re: Coding Guidelines need update for localization

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 22 Jul 2010 22:26:54 +0200

"Adrien Destugues" <pulkomandy@xxxxxxxxxxxxxxxxx> wrote:
> Avoid using << and similar methods for building a localized string.
> 
> Instead of : BString s << total << "MiB total, " << free << "MiB 
> free."
> do : BString s("%t MiB total, %f MiB free); s.ReplaceFirst("%t",
> total); 
> s.ReplaceFirst("%f", free);

I wouldn't mind more powerful string formatting functions, like what is 
possible with QString.arg() in Qt.

Bye,
   Axel.


Other related posts: