C++ Utilities: conversion/stringconversion.cpp File Reference

C++ Utilities 5.34.0 Useful C++ classes and routines such as argument parser, IO and conversion utilities

Loading...
Searching...
No Matches
Namespaces | Macros | Functions
stringconversion.cpp File Reference
`#include "./stringconversion.h"`
`#include "../feature_detection/features.h"`
`#include <cmath>`
`#include <cstdlib>`
`#include <iomanip>`
`#include <memory>`
`#include <sstream>`
`#include <errno.h>`
`#include <iconv.h>`
Include dependency graph for stringconversion.cpp:

Go to the source code of this file.

## Namespaces
namespace | CppUtilities
| Contains all utilities provided by the c++utilities library.

## Macros
#define | CPP_UTILITIES_THREAD_LOCAL

## 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.
CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf8ToUtf16LE (const char *inputBuffer, std::size_t inputBufferSize)
| Converts the specified UTF-8 string to UTF-16 (little-endian).
CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf16LEToUtf8 (const char *inputBuffer, std::size_t inputBufferSize)
| Converts the specified UTF-16 (little-endian) string to UTF-8.
CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf8ToUtf16BE (const char *inputBuffer, std::size_t inputBufferSize)
| Converts the specified UTF-8 string to UTF-16 (big-endian).
CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf16BEToUtf8 (const char *inputBuffer, std::size_t inputBufferSize)
| Converts the specified UTF-16 (big-endian) string to UTF-8.
CPP_UTILITIES_EXPORT StringData | CppUtilities::convertLatin1ToUtf8 (const char *inputBuffer, std::size_t inputBufferSize)
| Converts the specified Latin-1 string to UTF-8.
CPP_UTILITIES_EXPORT StringData | CppUtilities::convertUtf8ToLatin1 (const char *inputBuffer, std::size_t inputBufferSize)
| Converts the specified UTF-8 string to Latin-1.
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.
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.
CPP_UTILITIES_EXPORT std::string | CppUtilities::bitrateToString (double bitrateInKbitsPerSecond, bool useIecBinaryPrefixes)
| Converts the specified bitrate in kbit/s to its equivalent std::string representation.
CPP_UTILITIES_EXPORT std::string | CppUtilities::encodeBase64 (const std::uint8_t *data, std::uint32_t dataSize)
| Encodes the specified data to Base64.
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.

## Macro Definition Documentation

## ◆ CPP_UTILITIES_THREAD_LOCAL

#define CPP_UTILITIES_THREAD_LOCAL

Definition at line 8 of file stringconversion.cpp.