fawkes::StringConversions Class Reference

Utility class that holds string methods. More...

#include <utils/misc/string_conversions.h>

List of all members.

Static Public Member Functions

static std::string to_upper (std::string str)
 Convert string to all-uppercase string.
static std::string to_lower (std::string str)
 Convert string to all-lowercase string.
static std::string to_string (unsigned int i)
 Convert unsigned int value to a string.
static std::string to_string (int i)
 Convert int value to a string.
static std::string to_string (float f)
 Convert float value to a string.
static std::string to_string (double d)
 Convert double value to a string.
static std::string to_string (bool b)
 Convert bool value to a string.
static unsigned int to_uint (std::string s)
 Convert string to an unsigned int value.
static int to_int (std::string s)
 Convert string to an int value.
static float to_float (std::string s)
 Convert string to a float value.
static double to_double (std::string s)
 Convert string to a double value.
static bool to_bool (std::string s)
 Convert string to a bool value.
static void trim_inplace (std::string &s)
 Trim string.
static std::string trim (std::string &s)
 Trim spring.


Detailed Description

Utility class that holds string methods.

Author:
Tim Niemueller

Definition at line 32 of file string_conversions.h.


Member Function Documentation

bool fawkes::StringConversions::to_bool ( std::string  s  )  [static]

Convert string to a bool value.

Parameters:
s string to convert
Returns:
value as represented by string

Definition at line 206 of file string_conversions.cpp.

double fawkes::StringConversions::to_double ( std::string  s  )  [static]

Convert string to a double value.

Parameters:
s string to convert
Returns:
value as represented by string

Definition at line 195 of file string_conversions.cpp.

float fawkes::StringConversions::to_float ( std::string  s  )  [static]

Convert string to a float value.

Parameters:
s string to convert
Returns:
value as represented by string

Definition at line 184 of file string_conversions.cpp.

int fawkes::StringConversions::to_int ( std::string  s  )  [static]

Convert string to an int value.

Parameters:
s string to convert
Returns:
value as represented by string

Definition at line 173 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_lower ( std::string  str  )  [static]

Convert string to all-lowercase string.

Parameters:
str string to convert
Returns:
converted string

Definition at line 60 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_string ( bool  b  )  [static]

Convert bool value to a string.

Parameters:
b value to convert
Returns:
string representation of value.

Definition at line 146 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_string ( double  d  )  [static]

Convert double value to a string.

Parameters:
d value to convert
Returns:
string representation of value.

Definition at line 128 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_string ( float  f  )  [static]

Convert float value to a string.

Parameters:
f value to convert
Returns:
string representation of value.

Definition at line 110 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_string ( int  i  )  [static]

Convert int value to a string.

Parameters:
i value to convert
Returns:
string representation of value.

Definition at line 92 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_string ( unsigned int  i  )  [static]

Convert unsigned int value to a string.

Parameters:
i value to convert
Returns:
string representation of value.

Definition at line 74 of file string_conversions.cpp.

Referenced by WebviewFooterGenerator::html_footer().

unsigned int fawkes::StringConversions::to_uint ( std::string  s  )  [static]

Convert string to an unsigned int value.

Parameters:
s string to convert
Returns:
value as represented by string

Definition at line 161 of file string_conversions.cpp.

std::string fawkes::StringConversions::to_upper ( std::string  str  )  [static]

Convert string to all-uppercase string.

Parameters:
str string to convert
Returns:
converted string

Definition at line 46 of file string_conversions.cpp.

Referenced by CppInterfaceGenerator::CppInterfaceGenerator().

std::string fawkes::StringConversions::trim ( std::string &  s  )  [static]

Trim spring.

Removes spaces at beginning and end of string.

Parameters:
s string to trim
Returns:
trimmed string

Definition at line 237 of file string_conversions.cpp.

void fawkes::StringConversions::trim_inplace ( std::string &  s  )  [static]

Trim string.

Removes spaces at beginning and end of string.

Parameters:
s string to trim, upon return contains trimmed string

Definition at line 222 of file string_conversions.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:32:55 2011 for Fawkes API by  doxygen 1.4.7