Stride Reference Manual  - generated for commit 9643b11
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StringUtils.h File Reference

Miscellaneous string utilities. More...

#include <boost/algorithm/string.hpp>
#include <algorithm>
#include <cctype>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for StringUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 stride
 Namespace for the simulator and related classes.
 
 stride::util
 Utilities for the project.
 

Functions

bool stride::util::CheckAllDigits (const std::string &s)
 All characters in string are digits (or string is empty) More...
 
template<typename T >
stride::util::FromString (const std::string &s)
 Builds a value of type T representation from a string. More...
 
std::vector< std::string > stride::util::Split (const std::string &s, const std::string &delimiters)
 Split a string (in order of occurence) by splitting it on the given delimiters. More...
 
std::vector< std::string > stride::util::Tokenize (const std::string &str, const std::string &delimiters)
 Tokenize a string (in order of occurence) with the given delimiters. More...
 
template<typename T >
std::string stride::util::ToString (const T &value)
 Builds a string representation of a value of type T. More...
 
template<>
std::string stride::util::ToString< std::string > (const std::string &value)
 
template<typename It >
std::vector< std::string > stride::util::ToString (typename std::enable_if<!std::is_same< typename It::value_type, std::string >::value, It >::type first, It last)
 Stringify values (that are not strings) in a range and put them in a vector. More...
 
template<typename It >
std::vector< std::string > stride::util::ToString (typename std::enable_if< std::is_same< typename It::value_type, std::string >::value, It >::type first, It last)
 Stringify values (that are strings - so no-op) in a range and put them in a vector. More...
 
template<typename T >
std::string stride::util::ToString (const T &value, int width, char fill= ' ')
 Builds a string representation with minimum width of a value of type T. More...
 
std::string stride::util::ToLower (const std::string &source)
 Builds a string with lower case characters only. More...
 
std::string stride::util::ToUpper (const std::string &source)
 Builds a string with upper case characters only. More...
 
std::string stride::util::TrimRight (const std::string &source, const std::string &t=" ")
 Trim characters at right end of string. More...
 
std::string stride::util::TrimLeft (const std::string &source, const std::string &t=" ")
 Trim characters at left end of string. More...
 
std::string stride::util::Trim (const std::string &source, const std::string &t=" ")
 Trim characters at both ends of string. More...
 
template<typename T >
std::string stride::util::intToDottedString (const T &value)
 

Detailed Description

Miscellaneous string utilities.

Definition in file StringUtils.h.