Xbase64 Class Library  3.1.2
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
xbString Class Reference

xbString class More...

#include <xbstring.h>

Public Types

enum  { npos = -1 }
 

Public Member Functions

 xbString ()
 Short description. More...
 
 xbString (size_t size)
 Short description. More...
 
 xbString (char c)
 Short description. More...
 
 xbString (const char *s)
 Short description. More...
 
 xbString (const char *s, size_t maxlen)
 Short description. More...
 
 xbString (const xbString &s)
 Short description. More...
 
virtual ~xbString ()
 Short description. More...
 
 operator const char * () const
 Short description. More...
 
char operator[] (int n)
 
xbStringoperator= (const xbString &s)
 Short description. More...
 
xbStringoperator= (const char *s)
 Short description. More...
 
xbStringoperator= (char c)
 Short description. More...
 
xbStringoperator+= (const char *s)
 Short description. More...
 
xbStringoperator+= (char c)
 Short description. More...
 
xbStringoperator-= (const char *s)
 Short description. More...
 
xbBool operator== (const xbString &) const
 Short description. More...
 
xbBool operator!= (const xbString &) const
 Short description. More...
 
xbBool operator< (const xbString &) const
 Short description. More...
 
xbBool operator> (const xbString &) const
 Short description. More...
 
xbBool operator<= (const xbString &) const
 Short description. More...
 
xbBool operator>= (const xbString &) const
 Short description. More...
 
void addBackSlash (char c)
 Short description. More...
 
xbStringassign (const xbString &str, size_t pos=0, int n=npos)
 Short description. More...
 
xbStringassign (char *str, int n)
 Short description. More...
 
xbString copy () const
 Short description. More...
 
const char * c_str () const
 Short description. More...
 
int countChar (char c) const
 Short description. More...
 
int cvtHexChar (char &out)
 Short description. More...
 
int cvtHexString (xbString &out)
 Short description. More...
 
char getCharacter (int n) const
 
const char * getData () const
 Short description. More...
 
xbBool hasAlphaChars () const
 Short description. More...
 
xbBool isEmpty () const
 Short description. More...
 
xbBool isNull () const
 Short description. More...
 
size_t len () const
 Short description. More...
 
size_t length () const
 Short description. More...
 
xbString mid (size_t pos=0, int n=npos) const
 Short description. More...
 
void lTrunc (size_t cnt)
 Short description. More...
 
int pos (char c)
 Short description. More...
 
int pos (const char *s)
 Short description. More...
 
void putAt (size_t pos, char c)
 Short description. More...
 
xbStringremove (size_t pos=0, int n=npos)
 Short description. More...
 
void resize (size_t size)
 Short description. More...
 
void setNum (long num)
 Short description. More...
 
void setNum (char *fmt, double num)
 Short description. More...
 
xbStringsprintf (const char *format,...)
 Short description. More...
 
void swapChars (char from, char to)
 Short description. More...
 
void toLowerCase ()
 Short description. More...
 
void toUpperCase ()
 Short description. More...
 
void trim ()
 Short description. More...
 
void zapChar (char c)
 Short description. More...
 
void zapLeadingChar (char c)
 Short description. More...
 
int setFromDelimitedInput (const char *, char, int, int)
 Short description. More...
 

Protected Member Functions

void ctor (const char *s)
 Short description. More...
 
void ctor (const char *s, size_t maxlen)
 Short description. More...
 

Protected Attributes

char * data
 
size_t size
 

Static Protected Attributes

static const char * NullString = ""
 

Friends

XBDLLEXPORT std::ostream & operator<< (std::ostream &, const xbString &)
 Short description. More...
 

Detailed Description

xbString class

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
npos 

Constructor & Destructor Documentation

◆ xbString() [1/6]

xbString::xbString ( )

Short description.

◆ xbString() [2/6]

xbString::xbString ( size_t  size)

Short description.

Parameters
size

◆ xbString() [3/6]

xbString::xbString ( char  c)

Short description.

Parameters
c

◆ xbString() [4/6]

xbString::xbString ( const char *  s)

Short description.

Parameters
s

◆ xbString() [5/6]

xbString::xbString ( const char *  s,
size_t  maxlen 
)

Short description.

Parameters
s
maxlen

◆ xbString() [6/6]

xbString::xbString ( const xbString s)

Short description.

Parameters
s

◆ ~xbString()

xbString::~xbString ( )
virtual

Short description.

Member Function Documentation

◆ addBackSlash()

void xbString::addBackSlash ( char  c)

Short description.

Parameters
c

◆ assign() [1/2]

xbString & xbString::assign ( char *  str,
int  n 
)

Short description.

Parameters
str
n

◆ assign() [2/2]

xbString & xbString::assign ( const xbString str,
size_t  pos = 0,
int  n = npos 
)

Short description.

Parameters
str
pos
n

◆ c_str()

const char * xbString::c_str ( ) const

Short description.

◆ copy()

xbString xbString::copy ( ) const

Short description.

◆ countChar()

int xbString::countChar ( char  c) const

Short description.

Parameters
c

◆ ctor() [1/2]

void xbString::ctor ( const char *  s)
protected

Short description.

Parameters
s

◆ ctor() [2/2]

void xbString::ctor ( const char *  s,
size_t  maxlen 
)
protected

Short description.

Parameters
s
maxlen

◆ cvtHexChar()

int xbString::cvtHexChar ( char &  out)

Short description.

Parameters
out

◆ cvtHexString()

int xbString::cvtHexString ( xbString out)

Short description.

Parameters
out

◆ getCharacter()

char xbString::getCharacter ( int  n) const
inline

◆ getData()

const char * xbString::getData ( ) const

Short description.

◆ hasAlphaChars()

xbBool xbString::hasAlphaChars ( ) const

Short description.

◆ isEmpty()

xbBool xbString::isEmpty ( ) const

Short description.

◆ isNull()

xbBool xbString::isNull ( ) const

Short description.

◆ len()

size_t xbString::len ( ) const

Short description.

◆ length()

size_t xbString::length ( ) const

Short description.

◆ lTrunc()

void xbString::lTrunc ( size_t  cnt)

Short description.

Parameters
cnt

◆ mid()

xbString xbString::mid ( size_t  pos = 0,
int  n = npos 
) const

Short description.

Parameters
pos
n

◆ operator const char *()

xbString::operator const char * ( ) const

Short description.

◆ operator!=()

xbBool xbString::operator!= ( const xbString s2) const

Short description.

NULL != !NULL

◆ operator+=() [1/2]

xbString & xbString::operator+= ( char  c)

Short description.

◆ operator+=() [2/2]

xbString & xbString::operator+= ( const char *  s)

Short description.

◆ operator-=()

xbString & xbString::operator-= ( const char *  s)

Short description.

◆ operator<()

xbBool xbString::operator< ( const xbString s2) const

Short description.

NULL < !NULL

◆ operator<=()

xbBool xbString::operator<= ( const xbString s2) const

Short description.

NULL <= !NULL

◆ operator=() [1/3]

xbString & xbString::operator= ( char  c)

Short description.

◆ operator=() [2/3]

xbString & xbString::operator= ( const char *  s)

Short description.

◆ operator=() [3/3]

xbString & xbString::operator= ( const xbString s)

Short description.

◆ operator==()

xbBool xbString::operator== ( const xbString s2) const

Short description.

NULL == !NULL

◆ operator>()

xbBool xbString::operator> ( const xbString s2) const

Short description.

NULL > !NULL

◆ operator>=()

xbBool xbString::operator>= ( const xbString s2) const

Short description.

NULL >= !NULL

◆ operator[]()

char xbString::operator[] ( int  n)
inline

◆ pos() [1/2]

int xbString::pos ( char  c)

Short description.

Parameters
c

◆ pos() [2/2]

int xbString::pos ( const char *  s)

Short description.

Parameters
s

◆ putAt()

void xbString::putAt ( size_t  pos,
char  c 
)

Short description.

Parameters
pos
c

◆ remove()

xbString & xbString::remove ( size_t  pos = 0,
int  n = npos 
)

Short description.

Parameters
pos
n

◆ resize()

void xbString::resize ( size_t  size)

Short description.

Parameters
size

◆ setFromDelimitedInput()

int xbString::setFromDelimitedInput ( const char *  src,
char  delim,
int  skipcnt,
int  opt 
)

Short description.

Parameters
src
delim
skipcnt
opt

◆ setNum() [1/2]

void xbString::setNum ( char *  fmt,
double  num 
)

Short description.

Parameters
fmt
num

◆ setNum() [2/2]

void xbString::setNum ( long  num)

Short description.

Parameters
num

◆ sprintf()

xbString & xbString::sprintf ( const char *  format,
  ... 
)

Short description.

Parameters
format

◆ swapChars()

void xbString::swapChars ( char  from,
char  to 
)

Short description.

Parameters
from
to

◆ toLowerCase()

void xbString::toLowerCase ( )

Short description.

◆ toUpperCase()

void xbString::toUpperCase ( )

Short description.

◆ trim()

void xbString::trim ( )

Short description.

◆ zapChar()

void xbString::zapChar ( char  c)

Short description.

Parameters
c

◆ zapLeadingChar()

void xbString::zapLeadingChar ( char  c)

Short description.

Parameters
c

Friends And Related Function Documentation

◆ operator<<

XBDLLEXPORT std::ostream& operator<< ( std::ostream &  os,
const xbString xbs 
)
friend

Short description.

Member Data Documentation

◆ data

char* xbString::data
protected

◆ NullString

const char * xbString::NullString = ""
staticprotected

◆ size

size_t xbString::size
protected

The documentation for this class was generated from the following files: