Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_classes/hk_classes/hk_string.h File Reference

#include <string>

Go to the source code of this file.

Typedefs

typedef std::basic_string<
char > 
hk_string
 base class for strings in hk_classes

Functions

hk_string smallstringconversion (const hk_string &what, const hk_string &from, const hk_string &to)
hk_string l2u (const hk_string &what, const hk_string &locale="")
hk_string u2l (const hk_string &what, const hk_string &locale="")
hk_string string2upper (const hk_string &what)
hk_string string2lower (const hk_string &what)
hk_string format_number (double value, bool separator=true, int digits=2, const hk_string &locale="")
hk_string format_number (const hk_string &value, bool is_locale, bool separator, int digits, const hk_string &locale)
hk_string format_standard_number (double value, bool separator=false, int digits=8, const hk_string &standardlocale="C")
hk_string format_standard_number (const hk_string &value, bool separator=false, int digits=8, const hk_string &standardlocale="C")
double localestring2double (const hk_string &localenumberstring)
long int localestring2int (const hk_string &localenumberstring)
long unsigned int localestring2uint (const hk_string &localenumberstring)
double standardstring2double (const hk_string &standardnumberstring, const hk_string &standardlocale="C")
long int standardstring2int (const hk_string &standardnumberstring, const hk_string &standardlocale="C")
hk_string longint2string (long int value)
hk_string ulongint2string (unsigned long int value)
hk_string replace_all (const hk_string &what, const hk_string &where, const hk_string &with)
hk_string trimleft (const hk_string &)
hk_string trimright (const hk_string &)
hk_string trim (const hk_string &)
hk_string bin2hex (char n)
char hex2bin (const hk_string &)


Typedef Documentation

typedef std::basic_string<char> hk_string
 

base class for strings in hk_classes

Version:
Revision
1.20
Author:
Horst Knorr (hk_classes@knoda.org) should one day work with unicode. In the moment it is just the standard string class of your stl-library


Function Documentation

hk_string bin2hex char  n  ) 
 

hk_string format_number const hk_string value,
bool  is_locale,
bool  separator,
int  digits,
const hk_string locale
 

hk_string format_number double  value,
bool  separator = true,
int  digits = 2,
const hk_string locale = ""
 

formats a double value into a string. It uses your set locale.

Parameters:
separator if true your local thousands separator is used i.e the number 12345.6789 will be displayed in Germany as 12.345,6789 and in USA as 12,345.6789
digits the amount of digits of the number part <0. E.g. if digits is 2 the above number would be 12345.68

hk_string format_standard_number const hk_string value,
bool  separator = false,
int  digits = 8,
const hk_string standardlocale = "C"
 

hk_string format_standard_number double  value,
bool  separator = false,
int  digits = 8,
const hk_string standardlocale = "C"
 

formats a double value into a string ignoring your locale.

Parameters:
separator if true your local thousands separator is used i.e the number 12345.6789 12,345.6789
digits the amount of digits of the number part <0. E.g. if digits is 2 the above number would be 12345.68

char hex2bin const hk_string  ) 
 

hk_string l2u const hk_string what,
const hk_string locale = ""
 

double localestring2double const hk_string localenumberstring  ) 
 

converts a number in a string (which uses your locale) in a double value

long int localestring2int const hk_string localenumberstring  ) 
 

long unsigned int localestring2uint const hk_string localenumberstring  ) 
 

hk_string longint2string long int  value  ) 
 

converts a long int number to a non localized string

hk_string replace_all const hk_string what,
const hk_string where,
const hk_string with
 

replaces all characters 'what' in 'where' with 'with'.

Parameters:
what the search string to be replaced
where the string which should be altered
with the string replacement string
Returns:
the new string

hk_string smallstringconversion const hk_string what,
const hk_string from,
const hk_string to
 

double standardstring2double const hk_string standardnumberstring,
const hk_string standardlocale = "C"
 

converts a number in a string (which ignores your locale) in a double value

long int standardstring2int const hk_string standardnumberstring,
const hk_string standardlocale = "C"
 

converts a number in a string (which ignores your locale) in a long int value

hk_string string2lower const hk_string what  ) 
 

hk_string string2upper const hk_string what  ) 
 

hk_string trim const hk_string  ) 
 

hk_string trimleft const hk_string  ) 
 

hk_string trimright const hk_string  ) 
 

hk_string u2l const hk_string what,
const hk_string locale = ""
 

hk_string ulongint2string unsigned long int  value  ) 
 

converts a unsigned long int number to a non localized string


Generated on Thu Mar 9 18:40:41 2006 for hk_classes by  doxygen 1.4.1