BString Class Reference

#include <BString.h>

List of all members.

Public Member Functions

 BString ()
 BString (const BString &string)
 BString (const char *str)
 BString (const char *str, unsigned int len)
 BString (char ch)
 BString (int v)
 BString (unsigned int v)
 BString (long v)
 BString (unsigned long long)
 BString (double v)
 ~BString ()
BString copy ()
 Return an independant copy.
int len () const
 Length of string.
const char * retStr () const
 Ptr to char* representation.
char * retStrDup () const
 Ptr to newly malloc'd char*.
int retInt () const
 Return string as a int.
unsigned int retUInt () const
 Return string as a int.
double retDouble () const
 Return string as a double.
int compare (const BString &string) const
 Compare strings.
int compareWild (const BString &string) const
 Compare string to string with wildcards.
int compareWildExpression (const BString &string) const
 Compare string to space deliminated patterns.
BString append (const BString &str) const
 Append a string.
BStringtruncate (int len)
 Truncate to length len.
BStringpad (int len)
 Pad to length len.
BStringtoUpper ()
 Convert to uppercase.
BStringtoLower ()
 Convert to lowercase.
void removeNL ()
 Remove if present NL from last char.
BString justify (int leftMargin, int width)
 Justify the string to the given width.
BString subString (int start, int len) const
 Returns substring.
int del (int start, int len)
 Delete substring.
int insert (int start, BString str)
 Insert substring.
void printf (const char *fmt,...)
 Formated print into the string.
int find (char ch) const
 Find ch in string searching forwards.
int find (BString str) const
 Find string in string searching forwards.
int findReverse (char ch) const
 Find ch in string searching backwards.
BList< BStringgetTokenList (BString separators)
 Break string into tokens.
BList< BStringgetTokenList (char separator)
 Break string into tokens.
BString removeSeparators (BString separators)
 Remove any char from sepatators from string.
BString pullToken (BString terminators)
 Pull token from start of string.
BString pullSeparators (BString separators)
 Pull separators from start of string.
BString pullWord ()
 Pull a word out of the head of the string.
BString pullLine ()
 Pull a line out of the head of the string.
BString dirname ()
BString basename ()
BString extension ()
BUInt32 hash () const
BStringoperator= (const BString &string)
char & operator[] (int pos)
int operator== (const BString &s) const
int operator== (const char *s) const
int operator> (const BString &s) const
int operator> (const char *s) const
int operator< (const BString &s) const
int operator< (const char *s) const
int operator>= (const BString &s) const
int operator<= (const BString &s) const
int operator!= (const BString &s) const
int operator!= (const char *s) const
BString operator+ (const BString &s) const
BString operator+ (const char *s) const
BString operator+= (const BString &s)
BString operator+= (const char *s)
BString operator+ (char ch) const
BString operator+ (int i) const
BString operator+ (unsigned int i) const
BString operator+ (unsigned long long i) const
 operator const char * () const
BString field (int field) const
char ** fields ()

Static Public Member Functions

static BString convert (char ch)
 Converts char to string.
static BString convert (int value)
 Converts int to string.
static BString convert (unsigned int value)
 Converts uint to string.
static BString convert (long value)
 Converts long to string.
static BString convert (double value, int eFormat=0)
 Converts double to string.
static BString convert (unsigned long long value)
 Converts u long long to string.
static BString convertHex (int value)
 Converts int to string as hex value.
static BString convertHex (unsigned int value)
 Converts uint to string as hex value.

Protected Attributes

BRefDataostr

Private Member Functions

void init (const char *str)
int inString (int pos) const
int isSpace (char ch) const


Constructor & Destructor Documentation

BString::BString (  ) 

BString::BString ( const BString string  ) 

BString::BString ( const char *  str  ) 

BString::BString ( const char *  str,
unsigned int  len 
)

BString::BString ( char  ch  ) 

BString::BString ( int  v  ) 

BString::BString ( unsigned int  v  ) 

BString::BString ( long  v  ) 

BString::BString ( unsigned long  long  ) 

BString::BString ( double  v  ) 

BString::~BString (  ) 


Member Function Documentation

BString BString::append ( const BString str  )  const

Append a string.

BString BString::basename (  ) 

int BString::compare ( const BString string  )  const

Compare strings.

int BString::compareWild ( const BString string  )  const

Compare string to string with wildcards.

int BString::compareWildExpression ( const BString string  )  const

Compare string to space deliminated patterns.

BString BString::convert ( unsigned long long  value  )  [static]

Converts u long long to string.

BString BString::convert ( double  value,
int  eFormat = 0 
) [static]

Converts double to string.

BString BString::convert ( long  value  )  [static]

Converts long to string.

BString BString::convert ( unsigned int  value  )  [static]

Converts uint to string.

BString BString::convert ( int  value  )  [static]

Converts int to string.

BString BString::convert ( char  ch  )  [static]

Converts char to string.

BString BString::convertHex ( unsigned int  value  )  [static]

Converts uint to string as hex value.

BString BString::convertHex ( int  value  )  [static]

Converts int to string as hex value.

BString BString::copy (  ) 

Return an independant copy.

int BString::del ( int  start,
int  len 
)

Delete substring.

BString BString::dirname (  ) 

BString BString::extension (  ) 

BString BString::field ( int  field  )  const

char ** BString::fields (  ) 

int BString::find ( BString  str  )  const

Find string in string searching forwards.

int BString::find ( char  ch  )  const

Find ch in string searching forwards.

int BString::findReverse ( char  ch  )  const

Find ch in string searching backwards.

BList< BString > BString::getTokenList ( char  separator  ) 

Break string into tokens.

BList< BString > BString::getTokenList ( BString  separators  ) 

Break string into tokens.

BUInt32 BString::hash (  )  const

void BString::init ( const char *  str  )  [private]

int BString::insert ( int  start,
BString  str 
)

Insert substring.

int BString::inString ( int  pos  )  const [private]

int BString::isSpace ( char  ch  )  const [private]

BString BString::justify ( int  leftMargin,
int  width 
)

Justify the string to the given width.

int BString::len (  )  const

Length of string.

BString::operator const char * (  )  const [inline]

int BString::operator!= ( const char *  s  )  const [inline]

int BString::operator!= ( const BString s  )  const [inline]

BString BString::operator+ ( unsigned long long  i  )  const [inline]

BString BString::operator+ ( unsigned int  i  )  const [inline]

BString BString::operator+ ( int  i  )  const [inline]

BString BString::operator+ ( char  ch  )  const [inline]

BString BString::operator+ ( const char *  s  )  const [inline]

BString BString::operator+ ( const BString s  )  const [inline]

BString BString::operator+= ( const char *  s  )  [inline]

BString BString::operator+= ( const BString s  )  [inline]

int BString::operator< ( const char *  s  )  const [inline]

int BString::operator< ( const BString s  )  const [inline]

int BString::operator<= ( const BString s  )  const [inline]

BString & BString::operator= ( const BString string  ) 

int BString::operator== ( const char *  s  )  const [inline]

int BString::operator== ( const BString s  )  const [inline]

int BString::operator> ( const char *  s  )  const [inline]

int BString::operator> ( const BString s  )  const [inline]

int BString::operator>= ( const BString s  )  const [inline]

char & BString::operator[] ( int  pos  ) 

BString & BString::pad ( int  len  ) 

Pad to length len.

void BString::printf ( const char *  fmt,
  ... 
)

Formated print into the string.

BString BString::pullLine (  ) 

Pull a line out of the head of the string.

BString BString::pullSeparators ( BString  separators  ) 

Pull separators from start of string.

BString BString::pullToken ( BString  terminators  ) 

Pull token from start of string.

BString BString::pullWord (  ) 

Pull a word out of the head of the string.

void BString::removeNL (  ) 

Remove if present NL from last char.

BString BString::removeSeparators ( BString  separators  ) 

Remove any char from sepatators from string.

double BString::retDouble (  )  const

Return string as a double.

int BString::retInt (  )  const

Return string as a int.

const char * BString::retStr (  )  const

Ptr to char* representation.

char * BString::retStrDup (  )  const

Ptr to newly malloc'd char*.

unsigned int BString::retUInt (  )  const

Return string as a int.

BString BString::subString ( int  start,
int  len 
) const

Returns substring.

BString & BString::toLower (  ) 

Convert to lowercase.

BString & BString::toUpper (  ) 

Convert to uppercase.

BString & BString::truncate ( int  len  ) 

Truncate to length len.


Member Data Documentation

BRefData* BString::ostr [protected]


The documentation for this class was generated from the following files:
Generated on Mon Mar 1 16:29:51 2010 for LibBeamApi by  doxygen 1.4.7