souffle  2.0.2-371-g6315b36
Data Structures | Namespaces | Functions
StringUtil.h File Reference
#include "souffle/RamTypes.h"
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <fstream>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <typeinfo>
#include <vector>
Include dependency graph for StringUtil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  souffle::detail::declval< std::ostream & >()<< std::declval< T >()), void >::type >
 A type trait to check whether a given type is printable. More...
 
struct  souffle::detail::is_printable< T, filter >
 A type trait to check whether a given type is printable. More...
 

Namespaces

 souffle
 
 souffle::detail
 

Functions

bool souffle::canBeParsedAsRamFloat (const std::string &string)
 Can a string be parsed as RamFloat. More...
 
bool souffle::canBeParsedAsRamSigned (const std::string &string)
 Can a string be parsed as RamSigned. More...
 
bool souffle::canBeParsedAsRamUnsigned (const std::string &string)
 Can a string be parsed as RamUnsigned. More...
 
bool souffle::endsWith (const std::string &value, const std::string &ending)
 Determines whether the given value string ends with the given end string. More...
 
std::string souffle::escape (const std::string &inputString)
 
std::string souffle::escape (const std::string &inputString, const std::string &needle, const std::string &replacement)
 
std::string souffle::escapeJSONstring (const std::string &JSONstr)
 Escape JSON string. More...
 
std::string souffle::identifier (std::string id)
 Valid C++ identifier, note that this does not ensure the uniqueness of identifiers returned. More...
 
bool souffle::isNumber (const char *str)
 Check whether a string is a sequence of digits. More...
 
bool souffle::isPrefix (const std::string &prefix, const std::string &element)
 Determine if one string is a prefix of another. More...
 
RamFloat souffle::RamFloatFromString (const std::string &str, std::size_t *position=nullptr)
 Converts a string to a RamFloat. More...
 
RamSigned souffle::RamSignedFromString (const std::string &str, std::size_t *position=nullptr, const int base=10)
 Converts a string to a RamSigned. More...
 
RamUnsigned souffle::RamUnsignedFromString (const std::string &str, std::size_t *position=nullptr, const int base=10)
 Converts a string to a RamUnsigned. More...
 
std::vector< std::string > souffle::splitString (const std::string &str, char delimiter)
 Splits a string given a delimiter. More...
 
std::string souffle::stringify (const std::string &input)
 Stringify a string using escapes for escape, newline, tab, double-quotes and semicolons. More...
 
const std::string & souffle::toString (const std::string &str)
 A generic function converting strings into strings (trivial case). More...
 
template<typename T >
std::enable_if<!detail::is_printable< T >::value, std::string >::type souffle::toString (const T &)
 A fallback for the to-string function in case an unprintable object is supposed to be printed. More...
 
template<typename T >
std::enable_if< detail::is_printable< T >::value, std::string >::type souffle::toString (const T &value)
 A generic function converting arbitrary objects to strings by utilizing their print capability. More...
 
std::string souffle::unescape (const std::string &inputString)
 
std::string souffle::unescape (const std::string &inputString, const std::string &needle, const std::string &replacement)