PLaSK library
Loading...
Searching...
No Matches
string.hpp File Reference

This file contains string and parsers utils. More...

#include <string>
#include <tuple>
#include <vector>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/tokenizer.hpp>
#include <boost/units/detail/utility.hpp>
#include <plask/config.hpp>
Include dependency graph for string.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  plask::Printable
 Base class / helper for printable classes with virtual print method. More...
 

Namespaces

namespace  plask
 Patterson quadrature for complex function along specified line.
 

Typedefs

typedef boost::tokenizer< boost::escaped_list_separator< char > > plask::split_esc_tokenizer
 

Functions

template<typename Iter >
std::ostream & plask::print_seq (std::ostream &out, Iter begin, Iter end, const char *sep=", ")
 Print all values from sequence [begin, end) sepparating by sep.
 
std::pair< std::string, std::string > plask::splitString2 (const std::string &to_split, char splitter)
 Split string to two parts: before spliter and after spliter.
 
template<typename Pred >
std::string plask::filterChars (const std::string &str, Pred pred)
 Calculate copy of string str without some characters.
 
template<typename CharReplacer >
std::string plask::replaceChars (const std::string &str, CharReplacer repl)
 Calculate copy of string str with some characters replaced by other.
 
std::string plask::removedChars (const std::string &str, const std::string &chars_to_remove)
 
template<typename RangeT , typename PredicateT , typename SequenceSequenceT = std::vector<std::string>>
SequenceSequenceT plask::splitAndTrimPred (RangeT &input, PredicateT pred, boost::algorithm::token_compress_mode_type eCompress=boost::algorithm::token_compress_off)
 Split input to sequence of tokens.
 
split_esc_tokenizer plask::splitEscIterator (const std::string &str, char splitter, char quote_char='\'', char esc_char='\\')
 Split str to sequence of tokens.
 
std::vector< std::string > plask::splitEsc (const std::string &str, char splitter, char quote_char='\'', char esc_char='\\')
 Split str to sequence of tokens.
 
bool plask::isCid (const char *potential_id)
 Check if potential_id is valid C/C++/python name.
 
template<typename T >
std::string plask::type_name ()
 Get simplified type name of given type.
 

Detailed Description

This file contains string and parsers utils.

Definition in file string.hpp.