|
paludis
Version 1.4.0
|
Files | |
| file | destringify.hh |
| file | join.hh |
| file | stringify.hh |
| file | strip.hh |
| file | tokeniser.hh |
Namespaces | |
| namespace | paludis::destringify_internals |
| namespace | paludis::stringify_internals |
| namespace | paludis::delim_kind |
| namespace | paludis::delim_mode |
| namespace | paludis::tokeniser_internals |
Functions | |
| template<typename Type_ , typename Exception_ > | |
| Type_ | paludis::destringify (const std::string &s) |
| template<typename I_ , typename T_ > | |
| T_ | paludis::join (I_ i, I_ end, const T_ &joiner) |
| template<typename I_ , typename T_ , typename F_ > | |
| T_ | paludis::join (I_ i, I_ end, const T_ &joiner, const F_ &f) |
| template<typename I_ > | |
| std::string | paludis::join (I_ begin, const I_ end, const char *const t) |
| template<typename I_ , typename F_ > | |
| std::string | paludis::join (I_ begin, const I_ end, const char *const t, const F_ &f) |
| template<typename T_ > | |
| std::string | paludis::stringify_internals::real_stringify (const T_ &item) |
| template<typename T_ > | |
| std::string | paludis::stringify (const T_ &item) |
| std::string | paludis::strip_leading_string (const std::string &s, const std::string &remove) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::string | paludis::strip_leading (const std::string &s, const std::string &prefix) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::string | paludis::strip_trailing_string (const std::string &s, const std::string &remove) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result)) |
| std::string | paludis::strip_trailing (const std::string &s, const std::string &suffix) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result)) |
| template<typename DelimKind_ , typename DelimMode_ , typename Iter_ > | |
| void | paludis::tokenise (const std::string &s, const std::string &delims, const std::string "es, Iter_ iter) |
| template<typename Iter_ > | |
| void | paludis::tokenise_whitespace (const std::string &s, Iter_ iter) |
| template<typename Iter_ > | |
| void | paludis::tokenise_whitespace_quoted (const std::string &s, Iter_ iter) |
We provide various functions and classes that simplify common string handling operations.
| Type_ paludis::destringify | ( | const std::string & | s | ) |
Extract a value of some type from a string.
References paludis::destringify_internals::Destringifier< Type_, Exception_ >::do_destringify().
| T_ paludis::join | ( | I_ | i, |
| I_ | end, | ||
| const T_ & | joiner | ||
| ) |
Join together the items from i to end using joiner.
References paludis::stringify().
Referenced by paludis::join().
| T_ paludis::join | ( | I_ | i, |
| I_ | end, | ||
| const T_ & | joiner, | ||
| const F_ & | f | ||
| ) |
Join together the items from i to end using joiner, using a function other than stringify.
| std::string paludis::join | ( | I_ | begin, |
| const I_ | end, | ||
| const char *const | t | ||
| ) |
Convenience alternative join allowing a char * to be used for a string.
References paludis::join().
| std::string paludis::join | ( | I_ | begin, |
| const I_ | end, | ||
| const char *const | t, | ||
| const F_ & | f | ||
| ) |
Convenience alternative join allowing a char * to be used for a string, using a function other than stringify.
References paludis::join().
| std::string paludis::stringify_internals::real_stringify | ( | const T_ & | item | ) |
Internal function to convert item to a string, to make function pointers work more sensibly. May be overloaded, but should not be called directly.
References PALUDIS_ATTRIBUTE.
Referenced by paludis::stringify().
|
inline |
Convert item to a string. To customise for new types, overload stringify_internals::real_stringify, not this function.
References paludis::stringify_internals::real_stringify().
Referenced by paludis::join(), and paludis::LogMessageHandler::operator<<().
| std::string paludis::strip_leading | ( | const std::string & | s, |
| const std::string & | prefix | ||
| ) |
Return a string equal to s minus any leading characters that are contained in prefix.
| std::string paludis::strip_leading_string | ( | const std::string & | s, |
| const std::string & | remove | ||
| ) |
Return a string equal to s, minus the string remove if remove occurs at the start of s.
| std::string paludis::strip_trailing | ( | const std::string & | s, |
| const std::string & | suffix | ||
| ) |
Return a string equal to s minus any trailing characters that are contained in suffix.
| std::string paludis::strip_trailing_string | ( | const std::string & | s, |
| const std::string & | remove | ||
| ) |
Return a string equal to s, minus the string remove if remove occurs at the end of s.
| void paludis::tokenise | ( | const std::string & | s, |
| const std::string & | delims, | ||
| const std::string & | quotes, | ||
| Iter_ | iter | ||
| ) |
Tokenise a string.
| void paludis::tokenise_whitespace | ( | const std::string & | s, |
| Iter_ | iter | ||
| ) |
Convenience function: tokenise on whitespace.
| void paludis::tokenise_whitespace_quoted | ( | const std::string & | s, |
| Iter_ | iter | ||
| ) |
Convenience function: tokenise on whitespace, handling quoted strings.
1.8.3.1