michael@0: // FormatUtils.cpp michael@0: michael@0: #include "StdAfx.h" michael@0: michael@0: #include "FormatUtils.h" michael@0: #include "Common/IntToString.h" michael@0: #include "Windows/ResourceString.h" michael@0: michael@0: #ifdef LANG michael@0: #include "LangUtils.h" michael@0: #endif michael@0: michael@0: UString NumberToString(UInt64 number) michael@0: { michael@0: wchar_t numberString[32]; michael@0: ConvertUInt64ToString(number, numberString); michael@0: return numberString; michael@0: } michael@0: michael@0: UString MyFormatNew(const UString &format, const UString &argument) michael@0: { michael@0: UString result = format; michael@0: result.Replace(L"{0}", argument); michael@0: return result; michael@0: } michael@0: michael@0: UString MyFormatNew(UINT resourceID, michael@0: #ifdef LANG michael@0: UInt32 langID, michael@0: #endif michael@0: const UString &argument) michael@0: { michael@0: return MyFormatNew( michael@0: #ifdef LANG michael@0: LangString(resourceID, langID), michael@0: #else michael@0: NWindows::MyLoadStringW(resourceID), michael@0: #endif michael@0: argument); michael@0: }