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

ZenLib::Ztring Class Reference

#include <Ztring.h>

List of all members.

Public Member Functions

 Ztring ()
 Ztring (const std::string &s, size_type pos=0, size_type n=npos)
 Ztring (const std::string *s, size_type pos=0, size_type n=npos)
 Ztring (const char *s)
 Ztring (const char *s, size_type n)
 Ztring (const char s)
 Ztring (size_type n, const char s)
 Ztring (const int32, size_type radix=10)
 Ztring (const uint32, size_type radix=10)
 Ztring (const float)
 Ztring (const double)
Ztring operator+ (const Ztring &) const
Ztring & operator+= (const char *)
Ztring & operator+= (const Ztring &)
char & operator() (size_type index)
const char * Char () const
char * ToChar () const
 return a new char array

int32 Convert_int32 (ztring_t Options=Ztring_Rounded) const
 Convert into Int (32 bits).

uint32 Convert_uint32 (ztring_t Options=Ztring_Rounded) const
 Convert into unsigned Int (32 bits).

float Convert_float (ztring_t Options=Ztring_Rounded) const
 Convert into float.

Ztring * MakeLowerCase ()
 convert into lowercase

Ztring * MakeUpperCase ()
 convert into uppercase

Ztring * TrimLeft ()
 Remove leading whitespaces from a string.

Ztring * TrimRight ()
 Remove trailing whitespaces from a string.

Ztring * Trim ()
 Remove leading and trailing whitespaces from a string.

Ztring * Quote ()
 Quotes a string.

Ztring SubString (const std::string &Begin, const std::string &End, int Pos=0, ztring_t Options=Ztring_Nothing) const
 return a string between two strings

int FindAndReplace (const std::string &ToFind, const std::string &ReplaceBy, size_t Pos=0, ztring_t Options=Ztring_Nothing)
 replace a string by another one


Friends

Ztring operator+ (const char *, const Ztring &)


Constructor & Destructor Documentation

ZenLib::Ztring::Ztring   [inline]
 

ZenLib::Ztring::Ztring const std::string &    s,
size_type    pos = 0,
size_type    n = npos
[inline]
 

ZenLib::Ztring::Ztring const std::string *    s,
size_type    pos = 0,
size_type    n = npos
[inline]
 

ZenLib::Ztring::Ztring const char *    s [inline]
 

ZenLib::Ztring::Ztring const char *    s,
size_type    n
[inline]
 

ZenLib::Ztring::Ztring const char    s [inline]
 

ZenLib::Ztring::Ztring size_type    n,
const char    s
[inline]
 

ZenLib::Ztring::Ztring const    int32,
size_type    radix = 10
 

ZenLib::Ztring::Ztring const    uint32,
size_type    radix = 10
 

ZenLib::Ztring::Ztring const    float
 

ZenLib::Ztring::Ztring const    double
 


Member Function Documentation

const char* ZenLib::Ztring::Char   const [inline]
 

Deprecated:
Use c_str()

float ZenLib::Ztring::Convert_float ztring_t    Options = Ztring_Rounded const
 

Convert into float.

Returns:
the value corresponding
0 if there is a problem

int32 ZenLib::Ztring::Convert_int32 ztring_t    Options = Ztring_Rounded const
 

Convert into Int (32 bits).

Returns:
the value corresponding
0 if there is a problem

uint32 ZenLib::Ztring::Convert_uint32 ztring_t    Options = Ztring_Rounded const
 

Convert into unsigned Int (32 bits).

Returns:
the value corresponding 0 if there is a problem

int ZenLib::Ztring::FindAndReplace const std::string &    ToFind,
const std::string &    ReplaceBy,
size_t    Pos = 0,
ztring_t    Options = Ztring_Nothing
 

replace a string by another one

Parameters:
ToFind string to find
ToReplace string wich replace the string found
Pos Position to begin to scan string
Options Options for searching
Available : Ztring_CaseSensitive, Ztring_Recursive
Returns:
The substring
"" if not found

Ztring* ZenLib::Ztring::MakeLowerCase  
 

convert into lowercase

Ztring* ZenLib::Ztring::MakeUpperCase  
 

convert into uppercase

char& ZenLib::Ztring::operator() size_type    index [inline]
 

Ztring ZenLib::Ztring::operator+ const Ztring &    const
 

Ztring& ZenLib::Ztring::operator+= const Ztring &   
 

Ztring& ZenLib::Ztring::operator+= const char *   
 

Ztring* ZenLib::Ztring::Quote  
 

Quotes a string.

Ztring ZenLib::Ztring::SubString const std::string &    Begin,
const std::string &    End,
int    Pos = 0,
ztring_t    Options = Ztring_Nothing
const
 

return a string between two strings

Parameters:
Begin First string
End Second string
Pos Position to begin to scan string
Options Options for searching
Available : Ztring_CaseSensitive
Returns:
The substring
"" if not found

char* ZenLib::Ztring::ToChar   const
 

return a new char array

Warning:
you MUST delete this pointer! (delete[])

Ztring* ZenLib::Ztring::Trim  
 

Remove leading and trailing whitespaces from a string.

Ztring* ZenLib::Ztring::TrimLeft  
 

Remove leading whitespaces from a string.

Ztring* ZenLib::Ztring::TrimRight  
 

Remove trailing whitespaces from a string.


Friends And Related Function Documentation

Ztring operator+ const char *   ,
const Ztring &   
[friend]
 


The documentation for this class was generated from the following file:
Generated on Wed Jun 18 00:34:51 2003 for ZenLib by doxygen1.3-rc3