Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CL_StringHelp Class Reference

#include <string_help.h>

List of all members.

Static Public Member Functions

static std::vector< CL_String > split_text (const CL_String &text, const CL_String &split_string)
 Operations:.
static int compare (const CL_StringA &a, const CL_StringA &b, bool case_insensitive=false)
static int compare (const CL_StringW &a, const CL_StringW &b, bool case_insensitive=false)
static CL_String text_to_upper (const CL_String &s)
static CL_StringA local8_to_upper (const CL_StringA &s)
static CL_StringW ucs2_to_upper (const CL_StringW &s)
static CL_String text_to_lower (const CL_String &s)
static CL_StringA local8_to_lower (const CL_StringA &s)
static CL_StringW ucs2_to_lower (const CL_StringW &s)
static CL_String float_to_text (float value)
static CL_StringA float_to_local8 (float value)
static CL_StringW float_to_ucs2 (float value)
static float text_to_float (const CL_String &value)
static float local8_to_float (const CL_StringA &value)
static float ucs2_to_float (const CL_StringW &value)
static CL_String double_to_text (double value)
static CL_StringA double_to_local8 (double value)
static CL_StringW double_to_ucs2 (double value)
static double text_to_double (const CL_String &value)
static double local8_to_double (const CL_StringA &value)
static double ucs2_to_double (const CL_StringW &value)
static CL_String int_to_text (int value)
static CL_StringA int_to_local8 (int value)
static CL_StringW int_to_ucs2 (int value)
static int text_to_int (const CL_String &value)
static int local8_to_int (const CL_StringA &value)
static int ucs2_to_int (const CL_StringW &value)
static CL_StringA text_to_local8 (const CL_String &text)
static CL_StringA text_to_utf8 (const CL_String &text)
static CL_StringA ucs2_to_latin1 (const CL_StringW &ucs2)
static CL_StringA ucs2_to_latin9 (const CL_StringW &ucs2)
static CL_StringA ucs2_to_local8 (const CL_StringW &ucs2)
static CL_StringA ucs2_to_utf8 (const CL_StringW &ucs2)
static CL_String local8_to_text (const CL_StringA &local8)
static CL_String ucs2_to_text (const CL_StringW &ucs2)
static CL_StringW latin1_to_ucs2 (const CL_StringA &latin1)
static CL_StringW latin9_to_ucs2 (const CL_StringA &latin9)
static CL_StringW local8_to_ucs2 (const CL_StringA &local8)
static CL_StringW utf8_to_ucs2 (const CL_StringA &utf8)
static CL_String utf8_to_text (const CL_StringA &utf8)

Static Private Attributes

static const char trailing_bytes_for_utf8 [256]
 Implementation:.
static const unsigned char bitmask_leadbyte_for_utf8 [6]


Member Function Documentation

int CL_StringHelp::compare const CL_StringW a,
const CL_StringW b,
bool  case_insensitive = false
[static]
 

Definition at line 79 of file string_help.cpp.

int CL_StringHelp::compare const CL_StringA a,
const CL_StringA b,
bool  case_insensitive = false
[static]
 

Definition at line 64 of file string_help.cpp.

Referenced by CL_DomImplementation::has_feature().

CL_StringA CL_StringHelp::double_to_local8 double  value  )  [static]
 

Definition at line 224 of file string_help.cpp.

Referenced by double_to_text().

CL_String CL_StringHelp::double_to_text double  value  )  [static]
 

Definition at line 215 of file string_help.cpp.

References CL_String, double_to_local8(), and double_to_ucs2().

CL_StringW CL_StringHelp::double_to_ucs2 double  value  )  [static]
 

Definition at line 236 of file string_help.cpp.

Referenced by double_to_text().

CL_StringA CL_StringHelp::float_to_local8 float  value  )  [static]
 

Definition at line 169 of file string_help.cpp.

Referenced by float_to_text().

CL_String CL_StringHelp::float_to_text float  value  )  [static]
 

Definition at line 160 of file string_help.cpp.

References CL_String, float_to_local8(), and float_to_ucs2().

CL_StringW CL_StringHelp::float_to_ucs2 float  value  )  [static]
 

Definition at line 181 of file string_help.cpp.

Referenced by float_to_text().

CL_StringA CL_StringHelp::int_to_local8 int  value  )  [static]
 

Definition at line 279 of file string_help.cpp.

Referenced by int_to_text(), and CL_Service::main().

CL_String CL_StringHelp::int_to_text int  value  )  [static]
 

Definition at line 270 of file string_help.cpp.

References CL_String, int_to_local8(), and int_to_ucs2().

Referenced by CL_DNSResourceRecord::class_description(), CL_DNSResourceRecord::class_from_int(), CL_StringFormat::set_arg(), CL_DNSResourceRecord::type_description(), and CL_DNSResourceRecord::type_from_int().

CL_StringW CL_StringHelp::int_to_ucs2 int  value  )  [static]
 

Definition at line 291 of file string_help.cpp.

Referenced by int_to_text().

CL_StringW CL_StringHelp::latin1_to_ucs2 const CL_StringA latin1  )  [static]
 

Definition at line 415 of file string_help.cpp.

CL_StringW CL_StringHelp::latin9_to_ucs2 const CL_StringA latin9  )  [static]
 

Definition at line 424 of file string_help.cpp.

Referenced by local8_to_ucs2().

double CL_StringHelp::local8_to_double const CL_StringA value  )  [static]
 

Definition at line 260 of file string_help.cpp.

Referenced by text_to_double().

float CL_StringHelp::local8_to_float const CL_StringA value  )  [static]
 

Definition at line 205 of file string_help.cpp.

Referenced by text_to_float().

int CL_StringHelp::local8_to_int const CL_StringA value  )  [static]
 

Definition at line 315 of file string_help.cpp.

Referenced by CL_DNSResourceRecord::class_to_int(), text_to_int(), and CL_DNSResourceRecord::type_to_int().

CL_StringA CL_StringHelp::local8_to_lower const CL_StringA s  )  [static]
 

Definition at line 136 of file string_help.cpp.

Referenced by text_to_lower().

CL_String CL_StringHelp::local8_to_text const CL_StringA local8  )  [static]
 

Definition at line 433 of file string_help.cpp.

References CL_String, and local8_to_ucs2().

Referenced by CL_DNSResourceRecord::class_description(), CL_DNSResourceRecord::class_from_int(), CL_DateTime::get_zone_abbreviation(), CL_DNSResourceRecord::type_description(), and CL_DNSResourceRecord::type_from_int().

CL_StringW CL_StringHelp::local8_to_ucs2 const CL_StringA local8  )  [static]
 

Definition at line 451 of file string_help.cpp.

References latin9_to_ucs2().

Referenced by local8_to_text(), and text_to_utf8().

CL_StringA CL_StringHelp::local8_to_upper const CL_StringA s  )  [static]
 

Definition at line 103 of file string_help.cpp.

Referenced by text_to_upper().

std::vector< CL_String > CL_StringHelp::split_text const CL_String &  text,
const CL_String &  split_string
[static]
 

Operations:.

Definition at line 43 of file string_help.cpp.

double CL_StringHelp::text_to_double const CL_String &  value  )  [static]
 

Definition at line 251 of file string_help.cpp.

References local8_to_double(), and ucs2_to_double().

float CL_StringHelp::text_to_float const CL_String &  value  )  [static]
 

Definition at line 196 of file string_help.cpp.

References local8_to_float(), and ucs2_to_float().

int CL_StringHelp::text_to_int const CL_String &  value  )  [static]
 

Definition at line 306 of file string_help.cpp.

References local8_to_int(), and ucs2_to_int().

Referenced by CL_IPAddress::CL_IPAddress(), CL_TCPListen::CL_TCPListen(), and CL_TCPConnection::connect().

CL_StringA CL_StringHelp::text_to_local8 const CL_String &  text  )  [static]
 

Definition at line 330 of file string_help.cpp.

References ucs2_to_local8().

Referenced by CL_CryptoSetup::CL_CryptoSetup(), CL_IPAddress::CL_IPAddress(), CL_PipeConnection::CL_PipeConnection(), CL_PipeListen::CL_PipeListen(), CL_TCPListen::CL_TCPListen(), CL_DNSResourceRecord::class_description(), CL_DNSResourceRecord::class_to_int(), CL_TCPConnection::connect(), CL_File::create(), CL_FileHelp::delete_file(), CL_CryptoSetup::find_cert_from_nickname(), CL_FileLogger::log(), CL_File::open(), CL_DNSResolver::perform_query(), CL_DNSResourceRecord::type_description(), and CL_DNSResourceRecord::type_to_int().

CL_String CL_StringHelp::text_to_lower const CL_String &  s  )  [static]
 

Definition at line 127 of file string_help.cpp.

References CL_String, local8_to_lower(), and ucs2_to_lower().

CL_String CL_StringHelp::text_to_upper const CL_String &  s  )  [static]
 

Definition at line 94 of file string_help.cpp.

References CL_String, local8_to_upper(), and ucs2_to_upper().

CL_StringA CL_StringHelp::text_to_utf8 const CL_String &  text  )  [static]
 

Definition at line 339 of file string_help.cpp.

References local8_to_ucs2(), and ucs2_to_utf8().

double CL_StringHelp::ucs2_to_double const CL_StringW value  )  [static]
 

Definition at line 265 of file string_help.cpp.

Referenced by text_to_double().

float CL_StringHelp::ucs2_to_float const CL_StringW value  )  [static]
 

Definition at line 210 of file string_help.cpp.

Referenced by text_to_float().

int CL_StringHelp::ucs2_to_int const CL_StringW value  )  [static]
 

Definition at line 320 of file string_help.cpp.

References TEXT.

Referenced by text_to_int().

CL_StringA CL_StringHelp::ucs2_to_latin1 const CL_StringW ucs2  )  [static]
 

Definition at line 349 of file string_help.cpp.

CL_StringA CL_StringHelp::ucs2_to_latin9 const CL_StringW ucs2  )  [static]
 

Definition at line 358 of file string_help.cpp.

Referenced by ucs2_to_local8().

CL_StringA CL_StringHelp::ucs2_to_local8 const CL_StringW ucs2  )  [static]
 

Definition at line 367 of file string_help.cpp.

References ucs2_to_latin9().

Referenced by text_to_local8(), ucs2_to_text(), and utf8_to_text().

CL_StringW CL_StringHelp::ucs2_to_lower const CL_StringW s  )  [static]
 

Definition at line 148 of file string_help.cpp.

Referenced by text_to_lower().

CL_String CL_StringHelp::ucs2_to_text const CL_StringW ucs2  )  [static]
 

Definition at line 442 of file string_help.cpp.

References CL_String, and ucs2_to_local8().

CL_StringW CL_StringHelp::ucs2_to_upper const CL_StringW s  )  [static]
 

Definition at line 115 of file string_help.cpp.

Referenced by text_to_upper().

CL_StringA CL_StringHelp::ucs2_to_utf8 const CL_StringW ucs2  )  [static]
 

Definition at line 372 of file string_help.cpp.

Referenced by text_to_utf8().

CL_String CL_StringHelp::utf8_to_text const CL_StringA utf8  )  [static]
 

Definition at line 519 of file string_help.cpp.

References CL_String, ucs2_to_local8(), and utf8_to_ucs2().

Referenced by CL_DBCommand::get_index().

CL_StringW CL_StringHelp::utf8_to_ucs2 const CL_StringA utf8  )  [static]
 

Definition at line 456 of file string_help.cpp.

References bitmask_leadbyte_for_utf8, and trailing_bytes_for_utf8.

Referenced by CL_DBReturnValue::operator CL_StringW(), and utf8_to_text().


Member Data Documentation

const unsigned char CL_StringHelp::bitmask_leadbyte_for_utf8 [static, private]
 

Initial value:

{
        0x7f,
        0x1f,
        0x0f,
        0x07,
        0x03,
        0x01
}

Definition at line 544 of file string_help.cpp.

Referenced by utf8_to_ucs2().

const char CL_StringHelp::trailing_bytes_for_utf8 [static, private]
 

Initial value:

{
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
        1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
        2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
}
Implementation:.

Definition at line 532 of file string_help.cpp.

Referenced by utf8_to_ucs2().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:51:18 2005 for npcore by  doxygen 1.4.1