2012-04-28 09:30:38 +00:00
|
|
|
//
|
|
|
|
// NumberFormatter.cpp
|
|
|
|
//
|
|
|
|
// $Id: //poco/1.4/Foundation/src/NumberFormatter.cpp#4 $
|
|
|
|
//
|
|
|
|
// Library: Foundation
|
|
|
|
// Package: Core
|
|
|
|
// Module: NumberFormatter
|
|
|
|
//
|
|
|
|
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH.
|
|
|
|
// and Contributors.
|
|
|
|
//
|
2014-05-04 21:02:42 +02:00
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
2012-04-28 09:30:38 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/NumberFormatter.h"
|
|
|
|
#include "Poco/MemoryStream.h"
|
|
|
|
#include <iomanip>
|
|
|
|
#if !defined(POCO_NO_LOCALE)
|
|
|
|
#include <locale>
|
|
|
|
#endif
|
|
|
|
#include <cstdio>
|
|
|
|
|
|
|
|
|
2012-08-22 02:40:41 +00:00
|
|
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
2012-04-28 09:30:38 +00:00
|
|
|
#define I64_FMT "I64"
|
|
|
|
#elif defined(__APPLE__)
|
|
|
|
#define I64_FMT "q"
|
|
|
|
#else
|
|
|
|
#define I64_FMT "ll"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
namespace Poco {
|
|
|
|
|
|
|
|
|
|
|
|
std::string NumberFormatter::format(bool value, BoolFormat format)
|
|
|
|
{
|
2012-09-12 00:20:07 +00:00
|
|
|
switch(format)
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
case FMT_TRUE_FALSE:
|
|
|
|
if (value == true)
|
|
|
|
return "true";
|
|
|
|
return "false";
|
|
|
|
case FMT_YES_NO:
|
|
|
|
if (value == true)
|
|
|
|
return "yes";
|
|
|
|
return "no";
|
|
|
|
case FMT_ON_OFF:
|
|
|
|
if (value == true)
|
|
|
|
return "on";
|
|
|
|
return "off";
|
|
|
|
}
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, int value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz);
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, int value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz, false, width);
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append0(std::string& str, int value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz, false, width, '0');
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, int value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(static_cast<unsigned int>(value), 0x10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, int value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(static_cast<unsigned int>(value), 0x10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, unsigned value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, unsigned value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz, false, width);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append0(std::string& str, unsigned int value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, unsigned value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 0x10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, unsigned value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, long value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz);
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, long value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz, false, width);
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append0(std::string& str, long value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz, false, width, '0');
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, long value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(static_cast<unsigned long>(value), 0x10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, long value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(static_cast<unsigned long>(value), 0x10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, unsigned long value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, unsigned long value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append0(std::string& str, unsigned long value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, unsigned long value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 0x10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, unsigned long value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT)
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, Int64 value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz);
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, Int64 value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz, false, width, '0');
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append0(std::string& str, Int64 value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-22 10:08:46 -06:00
|
|
|
intToStr(value, 10, result, sz, false, width, '0');
|
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, Int64 value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(static_cast<UInt64>(value), 0x10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, Int64 value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(static_cast<UInt64>(value), 0x10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, UInt64 value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, UInt64 value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append0(std::string& str, UInt64 value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, UInt64 value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 0x10, result, sz);
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::appendHex(std::string& str, UInt64 value, int width)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char result[NF_MAX_INT_STRING_LEN];
|
2012-12-19 00:38:18 -06:00
|
|
|
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
2012-11-26 19:01:44 -06:00
|
|
|
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
2012-11-22 10:08:46 -06:00
|
|
|
str.append(result, sz);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT)
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, float value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char buffer[NF_MAX_FLT_STRING_LEN];
|
|
|
|
floatToStr(buffer, POCO_MAX_FLT_STRING_LEN, value);
|
|
|
|
str.append(buffer);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, double value)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
char buffer[NF_MAX_FLT_STRING_LEN];
|
|
|
|
doubleToStr(buffer, POCO_MAX_FLT_STRING_LEN, value);
|
|
|
|
str.append(buffer);
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, double value, int precision)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
std::string result;
|
|
|
|
str.append(doubleToStr(result, value, precision));
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, double value, int width, int precision)
|
|
|
|
{
|
2012-11-25 21:36:29 -06:00
|
|
|
std::string result;
|
|
|
|
str.append(doubleToStr(result, value, precision, width));
|
2012-04-28 09:30:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NumberFormatter::append(std::string& str, const void* ptr)
|
|
|
|
{
|
|
|
|
char buffer[24];
|
|
|
|
#if defined(POCO_PTR_IS_64_BIT)
|
|
|
|
#if defined(POCO_LONG_IS_64_BIT)
|
|
|
|
std::sprintf(buffer, "%016lX", (UIntPtr) ptr);
|
|
|
|
#else
|
2013-07-18 13:31:27 +02:00
|
|
|
std::sprintf(buffer, "%016" I64_FMT "X", (UIntPtr) ptr);
|
2012-04-28 09:30:38 +00:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
std::sprintf(buffer, "%08lX", (UIntPtr) ptr);
|
|
|
|
#endif
|
|
|
|
str.append(buffer);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Poco
|