stringtools.hpp File Reference
#include <stdlib.h>
#include <string>
#include <iomanip>
#include <vector>
#include <sstream>
#include <typeinfo>
#include "../exception/exception.hpp"
Include dependency graph for stringtools.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  NRLib::NRLibPrivate::UnsafeParser< A >
 
class  NRLib::NRLibPrivate::UnsafeParser< int >
 
class  NRLib::NRLibPrivate::UnsafeParser< double >
 
class  NRLib::NRLibPrivate::UnsafeParser< float >
 

Namespaces

namespace  NRLib
 
namespace  NRLib::NRLibPrivate
 

Functions

std::vector< std::stringNRLib::GetTokens (const std::string &s)
 
std::vector< std::stringNRLib::GetQuotedTokens (const std::string &s)
 
template<typename T >
bool NRLib::IsType (const std::string &s)
 
template<typename T >
NRLib::ParseType (const std::string &s)
 
template<>
std::string NRLib::ParseType< std::string > (const std::string &s)
 
template<typename T >
std::string NRLib::ToString (const T obj, int precision=-99999)
 
template<typename I >
NRLib::ParseAsciiArrayFast (std::string &s, I begin, size_t n)
 Not safe. Replaces whitespace in s with \0. More...
 
std::string NRLib::GetPath (const std::string &filename)
 Get the path from a full file name. More...
 
std::string NRLib::GetStem (const std::string &filename)
 Get the stem of the filename (filename without path and extension) More...
 
std::string NRLib::GetExtension (const std::string &filename)
 Get filename extension. More...
 
std::string NRLib::RemovePath (const std::string &filename)
 Get file name only (no path) from full file name. More...
 
std::string NRLib::PrependDir (const std::string &prefix, const std::string &str)
 
std::string NRLib::ReplaceExtension (const std::string &filename, const std::string &extension)
 Replace file extension. More...
 
std::string NRLib::AddExtension (const std::string &filename, const std::string &extension)
 Add an extension to the filename. More...
 
void NRLib::Substitute (std::string &text, const std::string &out, const std::string &in)
 In string text replace all occurences odf string "out" with string "in". More...
 
std::string NRLib::Uppercase (const std::string &text)
 Return uppercase of input string. More...
 
bool NRLib::IsNumber (const std::string &s)
 
std::string NRLib::Chomp (const std::string &s)
 
std::string NRLib::Whitespace ()
 String with different kinds of whitespace characters. More...