SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
StringUtil.h File Reference
#include <string>
#include <vector>
#include <sstream>
#include <fstream>
#include <iostream>
#include <Core/Utils/Legacy/share.h>

Go to the source code of this file.

Namespaces

 SCIRun
 STL datatypes needed.
 

Functions

bool from_string (const std::string &str, double &value)
 
bool from_string (const std::string &str, float &value)
 
bool from_string (const std::string &str, int &value)
 
bool from_string (const std::string &str, unsigned int &value)
 
bool from_string (const std::string &str, long &value)
 
bool from_string (const std::string &str, unsigned long &value)
 
bool from_string (const std::string &str, long long &value)
 
bool from_string (const std::string &str, unsigned long long &value)
 
template<class T >
bool multiple_from_string (const std::string &str, std::vector< T > &values)
 
template<class T >
bool from_string (const std::string &str, T &value)
 
bool string_to_bool (const std::string &str, bool &result)
 
bool string_to_int (const std::string &str, int &result)
 
bool string_to_double (const std::string &str, double &result)
 
bool string_to_unsigned_long (const std::string &str, unsigned long &result)
 
template<class T >
std::string to_string (T val)
 
template<class T >
std::string to_string (T val, int precision)
 
std::string string_toupper (std::string str)
 
std::string string_tolower (std::string str)
 
std::string basename (const std::string &path)
 Remove directory name. More...
 
std::string pathname (const std::string &path)
 Return directory name. More...
 
std::vector< std::string > split_string (const std::string &str, char sep)
 
std::string string_Cify (const std::string &str)
 C++ify a string, turn newlines into
, use , , \ ", etc. More...
 
char * ccast_unsafe (const std::string &str)
 Unsafe cast from string to char *, used to export strings to C functions. More...
 
std::string replace_substring (std::string str, const std::string &substr, const std::string &replacement)
 
bool ends_with (const std::string &str, const std::string &substr)
 
void strip_spaces (std::string &str)
 
void strip_surrounding_spaces (std::string &str)