Go to the documentation of this file.
7 #ifndef ATLAS_CODECS_UTILITY_H
8 #define ATLAS_CODECS_UTILITY_H
23 namespace Atlas {
namespace Codecs {
30 _snprintf(hex, 3,
"%x", c);
32 snprintf(hex, 3,
"%x", c);
41 if (sscanf(hex.c_str(),
"%x", &c) == 1) {
48 const std::string hexEncodeWithPrefix(
const std::string& prefix,
49 const std::string& special,
50 const std::string& message);
52 const std::string hexDecodeWithPrefix(
const std::string& prefix,
53 const std::string& message);
57 #endif // ATLAS_CODECS_UTILITY_H
const std::string charToHex(char c)
Convert an ASCII char to its hexadecimal value.
Definition: Utility.h:26
char hexToChar(const std::string &hex)
Convert a string with a hexadecimal value (2 characters) to an ASCII char.
Definition: Utility.h:38
The Atlas namespace.
Definition: Bridge.h:20
Copyright 2000-2004 the respective authors.
This document can be licensed under the terms of the GNU Free Documentation
License or the GNU General Public License and may be freely distributed under
the terms given by one of these licenses.