|
C++ Utilities
5.10.3
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
#include "./stringconversion.h"#include "resources/features.h"#include <cmath>#include <cstdlib>#include <iomanip>#include <limits>#include <memory>#include <sstream>#include <errno.h>#include <iconv.h>Go to the source code of this file.
Namespaces | |
| CppUtilities | |
| Contains all utilities provides by the c++utilities library. | |
Functions | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertString (const char *fromCharset, const char *toCharset, const char *inputBuffer, std::size_t inputBufferSize, float outputBufferSizeFactor) |
| Converts the specified string from one character set to another. More... | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf8ToUtf16LE (const char *inputBuffer, std::size_t inputBufferSize) |
| Converts the specified UTF-8 string to UTF-16 (little-endian). More... | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf16LEToUtf8 (const char *inputBuffer, std::size_t inputBufferSize) |
| Converts the specified UTF-16 (little-endian) string to UTF-8. More... | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf8ToUtf16BE (const char *inputBuffer, std::size_t inputBufferSize) |
| Converts the specified UTF-8 string to UTF-16 (big-endian). More... | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf16BEToUtf8 (const char *inputBuffer, std::size_t inputBufferSize) |
| Converts the specified UTF-16 (big-endian) string to UTF-8. More... | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertLatin1ToUtf8 (const char *inputBuffer, std::size_t inputBufferSize) |
| Converts the specified Latin-1 string to UTF-8. More... | |
| CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf8ToLatin1 (const char *inputBuffer, std::size_t inputBufferSize) |
| Converts the specified UTF-8 string to Latin-1. More... | |
| CPP_UTILITIES_EXPORT void | CppUtilities::truncateString (string &str, char terminationChar) |
| Truncates all characters after the first occurrence of the specified terminationChar and the termination character as well. More... | |
| CPP_UTILITIES_EXPORT std::string | CppUtilities::dataSizeToString (std::uint64_t sizeInByte, bool includeByte) |
| Converts the specified data size in byte to its equivalent std::string representation. More... | |
| CPP_UTILITIES_EXPORT std::string | CppUtilities::bitrateToString (double bitrateInKbitsPerSecond, bool useIecBinaryPrefixes) |
| Converts the specified bitrate in kbit/s to its equivalent std::string representation. More... | |
| CPP_UTILITIES_EXPORT std::string | CppUtilities::encodeBase64 (const std::uint8_t *data, std::uint32_t dataSize) |
| Encodes the specified data to Base64. More... | |
| CPP_UTILITIES_EXPORT std::pair< std::unique_ptr< std::uint8_t[]>, std::uint32_t > | CppUtilities::decodeBase64 (const char *encodedStr, const std::uint32_t strSize) |
| Decodes the specified Base64 encoded string. More... | |