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

hk_classes/hk_classes/hk_string.h

Go to the documentation of this file.
00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_classes library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_STRING
00012 #define HK_STRING
00013 #include <string>
00014 using namespace std;
00024     typedef std::basic_string <char> hk_string;
00025 // typedef basic_string <wchar_t> wstring;
00026 
00027 
00028 extern "C"
00029 {
00030     hk_string smallstringconversion(const hk_string & what, const hk_string& from, const hk_string& to);
00031     hk_string l2u(const hk_string& what,const hk_string& locale="");
00032     hk_string u2l(const hk_string& what,const hk_string& locale="");
00033     hk_string string2upper(const hk_string& what);
00034     hk_string string2lower(const hk_string& what);
00035 
00036 }
00037 
00038 
00046 hk_string format_number(double value,bool separator=true,int digits=2,const hk_string& locale="");
00047 hk_string format_number(const hk_string& value,bool is_locale, bool separator,int digits,const hk_string& locale);
00048 
00056 hk_string format_standard_number(double value,bool separator=false,int digits=8,const hk_string& standardlocale="C");
00057 hk_string format_standard_number(const hk_string& value,bool separator=false,int digits=8,const hk_string& standardlocale="C");
00058 
00062 double localestring2double(const hk_string& localenumberstring);
00063 
00064 long int localestring2int(const hk_string& localenumberstring);
00065 long unsigned int localestring2uint(const hk_string& localenumberstring);
00066 
00070 double standardstring2double(const hk_string& standardnumberstring,const hk_string& standardlocale="C");
00074 long int standardstring2int(const hk_string& standardnumberstring,const hk_string& standardlocale="C");
00078 hk_string longint2string(long int value);
00082 hk_string ulongint2string(unsigned long int value);
00090 hk_string replace_all(const hk_string& what,const hk_string& where,const hk_string& with);
00091 
00092 
00093 hk_string trimleft(const hk_string&);
00094 hk_string trimright(const hk_string&);
00095 hk_string trim(const hk_string&);
00096 hk_string bin2hex(char n);
00097 char       hex2bin(const hk_string&);
00098 
00099 #endif

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