mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Utilities for working with strings. More...
Utilities for working with strings.
Definition in file stringUtils.hpp.
Go to the source code of this file.
Namespaces | |
mx | |
The mxlib c++ namespace. | |
Functions | |
template<typename typeT , unsigned width = 0, char pad = ' '> | |
std::string | mx::ioutils::convertToString (const typeT &value, int precision=0) |
Convert a numerical value to a string. More... | |
template<typename typeT > | |
typeT | mx::ioutils::convertFromString (const std::string &str) |
Convert a string to a numerical value. More... | |
template<> | |
bool | mx::ioutils::convertFromString< bool > (const std::string &str) |
Template specialization of convertFromString for bool. More... | |
void | mx::ioutils::toLower (std::string &outstr, const std::string &instr) |
Convert a string to all lower case. More... | |
std::string | mx::ioutils::toLower (const std::string &instr) |
Convert a string to all lower case. More... | |
void | mx::ioutils::toUpper (std::string &outstr, const std::string &instr) |
Convert a string to all upper case. More... | |
std::string | mx::ioutils::toUpper (const std::string &instr) |
Convert a string to all upper case. More... | |
void | mx::ioutils::removeWhiteSpace (std::string &outstr, const std::string &instr) |
Remove all white space from a string. More... | |
std::string | mx::ioutils::removeWhiteSpace (const std::string &instr) |
Remove all white space from a string. More... | |
int | mx::ioutils::stringWrap (std::vector< std::string > &lines, const std::string &str, int width) |
Wrap a string by breaking it into smaller sized portions of a desired width. More... | |
template<typename typeT > | |
void | mx::ioutils::parseStringVector (std::vector< typeT > &v, const std::string &s, char delim=',') |
Parses a string into a vector of tokens delimited by a character. More... | |
template<typename typeT > | |
void | mx::ioutils::parseStringVector (std::vector< typeT > &v, const std::string &s, const std::string &delims) |
Parses a string into a vector of tokens delimited by a set of characters. More... | |