Kea 2.5.6
strutil.h File Reference
#include <algorithm>
#include <cctype>
#include <stdint.h>
#include <string>
#include <iomanip>
#include <sstream>
#include <vector>
#include <exceptions/exceptions.h>
#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
+ Include dependency graph for strutil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  isc::util::str::StringSanitizer
 Implements a regular expression based string scrubber. More...
class  isc::util::str::StringTokenError
 A Set of C++ Utilities for Manipulating Strings. More...


namespace  isc
 Defines the logger used by the top-level component of kea-lfc.
namespace  isc::util
namespace  isc::util::str


typedef boost::shared_ptr< StringSanitizerImpl > isc::util::str::StringSanitizerImplPtr
 Type representing the pointer to the StringSanitizerImpl.
typedef boost::shared_ptr< StringSanitizer > isc::util::str::StringSanitizerPtr
 Type representing the pointer to the StringSanitizer.


void isc::util::str::decodeColonSeparatedHexString (const std::string &hex_string, std::vector< uint8_t > &binary)
 Converts a string of hexadecimal digits with colons into a vector.
void isc::util::str::decodeFormattedHexString (const std::string &hex_string, std::vector< uint8_t > &binary)
 Converts a formatted string of hexadecimal digits into a vector.
void isc::util::str::decodeSeparatedHexString (const std::string &hex_string, const std::string &sep, std::vector< uint8_t > &binary)
 Converts a string of separated hexadecimal digits into a vector.
std::string isc::util::str::dumpAsHex (const uint8_t *data, size_t length)
 Dumps a buffer of bytes as a string of hexadecimal digits.
std::string isc::util::str::format (const std::string &format, const std::vector< std::string > &args)
 Apply Formatting.
std::string isc::util::str::getToken (std::istringstream &iss)
 Returns one token from the given stringstream.
bool isc::util::str::isPrintable (const std::string &content)
 Check if a string is printable.
bool isc::util::str::isPrintable (const std::vector< uint8_t > &content)
 Check if a byte vector is printable.
void isc::util::str::lowercase (std::string &text)
 Lowercase String.
void isc::util::str::normalizeSlash (std::string &name)
 Normalize Backslash.
std::vector< uint8_t > isc::util::str::quotedStringToBinary (const std::string &quoted_string)
 Converts a string in quotes into vector.
template<typename Iterator >
Iterator isc::util::str::seekTrimmed (Iterator begin, Iterator end, uint8_t trim_val)
 Finds the "trimmed" end of a buffer.
vector< string > isc::util::str::tokens (const std::string &text, const std::string &delim=std::string(" \t\n"), bool escape=false)
 Split String into Tokens.
template<typename NumType , int BitSize>
NumType isc::util::str::tokenToNum (const std::string &num_token)
 Converts a string token to an unsigned integer.
char isc::util::str::toLower (char chr)
 Lowercase Character.
char isc::util::str::toUpper (char chr)
 Uppercase Character.
string isc::util::str::trim (const std::string &instring)
 Trim Leading and Trailing Spaces.
void isc::util::str::uppercase (std::string &text)
 Uppercase String.