other-licenses/7zstub/src/7zip/FileManager/FormatUtils.cpp

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:24052cbd5663
1 // FormatUtils.cpp
2
3 #include "StdAfx.h"
4
5 #include "FormatUtils.h"
6 #include "Common/IntToString.h"
7 #include "Windows/ResourceString.h"
8
9 #ifdef LANG
10 #include "LangUtils.h"
11 #endif
12
13 UString NumberToString(UInt64 number)
14 {
15 wchar_t numberString[32];
16 ConvertUInt64ToString(number, numberString);
17 return numberString;
18 }
19
20 UString MyFormatNew(const UString &format, const UString &argument)
21 {
22 UString result = format;
23 result.Replace(L"{0}", argument);
24 return result;
25 }
26
27 UString MyFormatNew(UINT resourceID,
28 #ifdef LANG
29 UInt32 langID,
30 #endif
31 const UString &argument)
32 {
33 return MyFormatNew(
34 #ifdef LANG
35 LangString(resourceID, langID),
36 #else
37 NWindows::MyLoadStringW(resourceID),
38 #endif
39 argument);
40 }

mercurial