Obsidian
Probabilistic Geophysical Joint Inversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
string.hpp File Reference

String helper functions. More...

#include <string>
#include <sstream>
#include <iomanip>
Include dependency graph for string.hpp:
This graph shows which files directly or indirectly include this file:

Namespaces

 obsidian
 
 obsidian::io
 

Functions

std::vector< std::string > obsidian::io::split (const std::string &stringToSplit, const char delimiterForSplitting= ' ')
 Split string. More...
 
std::string obsidian::io::join (const std::vector< std::string > &stringArray, const std::string glue=" ")
 Concatenate String. More...
 
template<typename ValueType >
ValueType obsidian::io::from_string (const std::string &stringToParse)
 Parse value from string.
 
template<typename ValueType >
std::string obsidian::io::to_string (const ValueType &v)
 Convert Value to String.
 
template<typename ValueType , typename... Vr>
std::string obsidian::io::to_string (const ValueType &v, Vr...vr)
 Convert Value to String.
 
template<>
std::string obsidian::io::to_string< bool > (const bool &v)
 Convert bool to string.
 
template<>
std::string obsidian::io::to_string< float > (const float &v)
 Convert float to string with 10 significant digits.
 
template<>
std::string obsidian::io::to_string< double > (const double &v)
 Convert double to string with 20 significant digits.
 
template<>
std::string obsidian::io::to_string< long double > (const long double &v)
 Convert long double to string with 40 significant digits.
 

Detailed Description

String helper functions.

Author
Lachlan McCalman
Nahid Akbar
Date
2014-04-26
License:
General Public License version 3 or later