From f2902217b38cf2e16e851ae84d61247f8e828180 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 25 Mar 2019 17:53:14 +0100 Subject: Update the 7z installer stub source to 18.05. Tag #1022 --- .../src/CPP/7zip/UI/FileManager/FormatUtils.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 other-licenses/7zstub/src/CPP/7zip/UI/FileManager/FormatUtils.cpp (limited to 'other-licenses/7zstub/src/CPP/7zip/UI/FileManager/FormatUtils.cpp') diff --git a/other-licenses/7zstub/src/CPP/7zip/UI/FileManager/FormatUtils.cpp b/other-licenses/7zstub/src/CPP/7zip/UI/FileManager/FormatUtils.cpp new file mode 100644 index 000000000..4f7ef74e5 --- /dev/null +++ b/other-licenses/7zstub/src/CPP/7zip/UI/FileManager/FormatUtils.cpp @@ -0,0 +1,28 @@ +// FormatUtils.cpp + +#include "StdAfx.h" + +#include "../../../Common/IntToString.h" + +#include "FormatUtils.h" + +#include "LangUtils.h" + +UString NumberToString(UInt64 number) +{ + wchar_t numberString[32]; + ConvertUInt64ToString(number, numberString); + return numberString; +} + +UString MyFormatNew(const UString &format, const UString &argument) +{ + UString result = format; + result.Replace(L"{0}", argument); + return result; +} + +UString MyFormatNew(UINT resourceID, const UString &argument) +{ + return MyFormatNew(LangString(resourceID), argument); +} -- cgit v1.2.3