LogCabin
|
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cstdarg>
#include <cstring>
#include <functional>
#include <locale>
#include <sstream>
#include "Core/StringUtil.h"
Go to the source code of this file.
Namespaces | |
namespace | LogCabin |
namespace | LogCabin::Core |
namespace | LogCabin::Core::StringUtil |
namespace | LogCabin::Core::StringUtil::anonymous_namespace{StringUtil.cc} |
Functions | |
bool | LogCabin::Core::StringUtil::anonymous_namespace{StringUtil.cc}::display (char c) |
Returns true for the ASCII characters that one would want to display in a single line of text. | |
std::string | LogCabin::Core::StringUtil::flags (int value, std::initializer_list< std::pair< int, const char * >> flags) |
Format an ORed group of flags as a string. | |
std::string | LogCabin::Core::StringUtil::format (const char *format,...))) |
A safe version of sprintf. | |
bool | LogCabin::Core::StringUtil::isPrintable (const char *str) |
Determine whether a null-terminated string is printable. | |
bool | LogCabin::Core::StringUtil::isPrintable (const void *data, size_t length) |
Determine whether some data is a printable, null-terminated string. | |
std::string | LogCabin::Core::StringUtil::join (const std::vector< std::string > &components, const std::string &glue) |
void | LogCabin::Core::StringUtil::replaceAll (std::string &haystack, const std::string &needle, const std::string &replacement) |
For strings, replace all occurrences of 'needle' in 'haystack' with 'replacement'. | |
std::vector< std::string > | LogCabin::Core::StringUtil::split (const std::string &subject, char delimiter) |
Split a string into multiple components by a character. | |
bool | LogCabin::Core::StringUtil::startsWith (const std::string &haystack, const std::string &needle) |
Return true if haystack begins with needle. | |
bool | LogCabin::Core::StringUtil::endsWith (const std::string &haystack, const std::string &needle) |
Return true if haystack ends with needle. | |
std::string | LogCabin::Core::StringUtil::trim (const std::string &s) |
Return a copy of the given string except with no leading or trailing whitespace. |