No Matches
text_utility.h File Reference

String manipulation functions. More...

Go to the source code of this file.


namespace  mcrl2
 A class that takes a linear process specification and checks all tau-summands of that LPS for confluence.
namespace  mcrl2::utilities


template<class CharContainer >
bool mcrl2::utilities::contains_only_ascii_symbols (const CharContainer &input)
 Checks whether the input only contains proper ascii characters, including common control characters.
template<typename T >
std::string mcrl2::utilities::to_string (const T &x)
 Transform parameter into string.
std::vector< std::string > mcrl2::utilities::split_paragraphs (const std::string &text)
 Split a string into paragraphs.
std::vector< std::string > mcrl2::utilities::split (const std::string &line, const std::string &separators)
 Split the text.
std::string mcrl2::utilities::read_text (const std::string &filename, bool warn=false)
 Read text from a file.
std::string mcrl2::utilities::read_text (std::istream &in)
 Read text from a stream.
std::string mcrl2::utilities::remove_comments (const std::string &text)
 Remove comments from a text (everything from '' until end of line).
std::string mcrl2::utilities::remove_whitespace (const std::string &text)
 Removes whitespace from a string.
std::string mcrl2::utilities::regex_replace (const std::string &src, const std::string &dest, const std::string &text)
 Regular expression replacement in a string.
std::vector< std::string > mcrl2::utilities::regex_split (const std::string &text, const std::string &sep)
 Split a string using a regular expression separator.
std::string mcrl2::utilities::trim_copy (const std::string &text)
 Remove all trailing and leading spaces from the input.
void mcrl2::utilities::trim (std::string &text)
 Remove all trailing and leading spaces from the input.
template<typename Container >
std::string mcrl2::utilities::string_join (const Container &c, const std::string &separator)
 Joins a sequence of strings. This is a replacement for boost::algorithm::join, since it gives stack overflow errors with Visual C++ express 9.0 under some circumstances.
std::string mcrl2::utilities::word_wrap_text (const std::string &text, unsigned int max_line_length=78)
 Apply word wrapping to a text.
bool mcrl2::utilities::is_numeric_string (const std::string &s)
 Test if a string is a number.
void mcrl2::utilities::number2string (std::size_t number, std::string &buffer, std::size_t start_position)
 Convert a number to a string in the buffer starting at position start_position.
std::string mcrl2::utilities::number2string (std::size_t number)
 Convert a number to string.

Detailed Description

String manipulation functions.

Definition in file text_utility.h.