Bsoft  2.1.0
Bernard's software package
Bstring Class Reference

#include <Bstring.h>

Public Member Functions

 Bstring ()
 
 Bstring (const Bstring &s)
 
 Bstring (const string &s)
 
 Bstring (const Bstring &s, long start, long len)
 
 Bstring (const char *c)
 
 Bstring (const char *c, long start, long len)
 
 Bstring (const char c, long size)
 
string str ()
 
template<typename T >
 Bstring (T value, const char *format)
 
 ~Bstring ()
 
Bstring & operator= (const Bstring &s)
 
Bstring & operator= (const string &s)
 
Bstring & operator= (const char *c)
 
Bstring & operator+= (const Bstring &s)
 
Bstring operator+ (const Bstring &s)
 
Bstring operator+ (const Bstring &s) const
 
Bstring & operator+= (const char c)
 
Bstring operator+ (const char c)
 
bool operator== (const Bstring &s)
 
bool operator!= (const Bstring &s)
 
bool operator> (const Bstring &s)
 
bool operator< (const Bstring &s)
 
bool operator>= (const Bstring &s)
 
bool operator<= (const Bstring &s)
 
Bstring operator<< (int n)
 
Bstring operator>> (int n)
 
char & operator[] (long i)
 
const char * c_str ()
 
bool empty ()
 
long length () const
 
long count (const char c)
 
long compare (const Bstring &s)
 
long compare_value (const Bstring &s)
 
Bstring common (const Bstring &s)
 
void fill (const char c)
 
void place (long i, const Bstring &s)
 
Bstring lower ()
 
Bstring upper ()
 
Bstring substr (long start, long len)
 
Bstring no_space ()
 
Bstring no_lead_space ()
 
Bstring alnum ()
 
Bstring left (long len)
 
Bstring right (long len)
 
Bstring pre (char c)
 
Bstring post (char c)
 
Bstring pre_rev (char c)
 
Bstring post_rev (char c)
 
Bstring within (char c1, char c2)
 
Bstring replace (char cold, char cnew)
 
Bstring remove (const char c)
 
Bstring swap (const long i, const long j)
 
Bstring erase (const long i)
 
Bstring truncate (const long n)
 
Bstring base ()
 
Bstring extension ()
 
Bstring canonical (int n)
 
long integer ()
 
double real ()
 
long index (const char c)
 
long index (const char c, long start)
 
long find (const Bstring &s)
 
long find (const Bstring &s, long start)
 
long rfind (const Bstring &s)
 
long rfind (const Bstring &s, long start)
 
bool contains (const Bstring &s)
 
Bstring insert (long pos, const Bstring &s)
 
Bstring * split ()
 
Bstring * split (const Bstring &delim)
 
vector< long > split_into_integers (const Bstring &delim)
 
vector< double > split_into_doubles (const Bstring &delim)
 

Public Attributes

Bstring * next
 

Friends

Bstring operator+ (const char *c, const Bstring &s)
 

Detailed Description

Definition at line 29 of file Bstring.h.

Constructor & Destructor Documentation

◆ Bstring() [1/8]

Bstring::Bstring ( )
inline

Definition at line 35 of file Bstring.h.

◆ Bstring() [2/8]

Bstring::Bstring ( const Bstring &  s)

Constructor

Definition at line 22 of file Bstring.cpp.

◆ Bstring() [3/8]

Bstring::Bstring ( const string &  s)

Definition at line 34 of file Bstring.cpp.

◆ Bstring() [4/8]

Bstring::Bstring ( const Bstring &  s,
long  start,
long  len 
)

Definition at line 46 of file Bstring.cpp.

◆ Bstring() [5/8]

Bstring::Bstring ( const char *  c)

Definition at line 63 of file Bstring.cpp.

◆ Bstring() [6/8]

Bstring::Bstring ( const char *  c,
long  start,
long  len 
)

Definition at line 77 of file Bstring.cpp.

◆ Bstring() [7/8]

Bstring::Bstring ( const char  c,
long  size 
)

Definition at line 96 of file Bstring.cpp.

◆ Bstring() [8/8]

template<typename T >
Bstring::Bstring ( T  value,
const char *  format 
)
inline

Definition at line 44 of file Bstring.h.

◆ ~Bstring()

Bstring::~Bstring ( )
inline

Definition at line 52 of file Bstring.h.

Member Function Documentation

◆ alnum()

Bstring Bstring::alnum ( )

Definition at line 357 of file Bstring.cpp.

◆ base()

Bstring Bstring::base ( )

Definition at line 516 of file Bstring.cpp.

◆ c_str()

const char* Bstring::c_str ( )
inline

Definition at line 70 of file Bstring.h.

◆ canonical()

Bstring Bstring::canonical ( int  n)

Definition at line 535 of file Bstring.cpp.

◆ common()

Bstring Bstring::common ( const Bstring &  s)

Definition at line 296 of file Bstring.cpp.

◆ compare()

long Bstring::compare ( const Bstring &  s)

Definition at line 277 of file Bstring.cpp.

◆ compare_value()

long Bstring::compare_value ( const Bstring &  s)

Definition at line 285 of file Bstring.cpp.

◆ contains()

bool Bstring::contains ( const Bstring &  s)

Definition at line 592 of file Bstring.cpp.

◆ count()

long Bstring::count ( const char  c)

Definition at line 269 of file Bstring.cpp.

◆ empty()

bool Bstring::empty ( )
inline

Definition at line 71 of file Bstring.h.

◆ erase()

Bstring Bstring::erase ( const long  i)

Definition at line 493 of file Bstring.cpp.

◆ extension()

Bstring Bstring::extension ( )

Definition at line 523 of file Bstring.cpp.

◆ fill()

void Bstring::fill ( const char  c)

Definition at line 304 of file Bstring.cpp.

◆ find() [1/2]

long Bstring::find ( const Bstring &  s)
inline

Definition at line 104 of file Bstring.h.

◆ find() [2/2]

long Bstring::find ( const Bstring &  s,
long  start 
)

Definition at line 570 of file Bstring.cpp.

◆ index() [1/2]

long Bstring::index ( const char  c)
inline

Definition at line 102 of file Bstring.h.

◆ index() [2/2]

long Bstring::index ( const char  c,
long  start 
)

Definition at line 560 of file Bstring.cpp.

◆ insert()

Bstring Bstring::insert ( long  pos,
const Bstring &  s 
)

Definition at line 598 of file Bstring.cpp.

◆ integer()

long Bstring::integer ( )

Definition at line 547 of file Bstring.cpp.

◆ left()

Bstring Bstring::left ( long  len)

Definition at line 366 of file Bstring.cpp.

◆ length()

long Bstring::length ( ) const

Definition at line 263 of file Bstring.cpp.

◆ lower()

Bstring Bstring::lower ( )

Definition at line 316 of file Bstring.cpp.

◆ no_lead_space()

Bstring Bstring::no_lead_space ( )

Definition at line 349 of file Bstring.cpp.

◆ no_space()

Bstring Bstring::no_space ( )

Definition at line 340 of file Bstring.cpp.

◆ operator!=()

bool Bstring::operator!= ( const Bstring &  s)

Definition at line 208 of file Bstring.cpp.

◆ operator+() [1/3]

Bstring Bstring::operator+ ( const Bstring &  s)

Definition at line 155 of file Bstring.cpp.

◆ operator+() [2/3]

Bstring Bstring::operator+ ( const Bstring &  s) const

Definition at line 170 of file Bstring.cpp.

◆ operator+() [3/3]

Bstring Bstring::operator+ ( const char  c)

Definition at line 191 of file Bstring.cpp.

◆ operator+=() [1/2]

Bstring & Bstring::operator+= ( const Bstring &  s)

Definition at line 149 of file Bstring.cpp.

◆ operator+=() [2/2]

Bstring & Bstring::operator+= ( const char  c)

Definition at line 185 of file Bstring.cpp.

◆ operator<()

bool Bstring::operator< ( const Bstring &  s)

Definition at line 218 of file Bstring.cpp.

◆ operator<<()

Bstring Bstring::operator<< ( int  n)

Definition at line 233 of file Bstring.cpp.

◆ operator<=()

bool Bstring::operator<= ( const Bstring &  s)

Definition at line 228 of file Bstring.cpp.

◆ operator=() [1/3]

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

Definition at line 108 of file Bstring.cpp.

◆ operator=() [2/3]

Bstring & Bstring::operator= ( const char *  c)

Definition at line 135 of file Bstring.cpp.

◆ operator=() [3/3]

Bstring & Bstring::operator= ( const string &  s)

Definition at line 122 of file Bstring.cpp.

◆ operator==()

bool Bstring::operator== ( const Bstring &  s)

Definition at line 203 of file Bstring.cpp.

◆ operator>()

bool Bstring::operator> ( const Bstring &  s)

Definition at line 213 of file Bstring.cpp.

◆ operator>=()

bool Bstring::operator>= ( const Bstring &  s)

Definition at line 223 of file Bstring.cpp.

◆ operator>>()

Bstring Bstring::operator>> ( int  n)

Definition at line 240 of file Bstring.cpp.

◆ operator[]()

char & Bstring::operator[] ( long  i)

Definition at line 247 of file Bstring.cpp.

◆ place()

void Bstring::place ( long  i,
const Bstring &  s 
)

Definition at line 310 of file Bstring.cpp.

◆ post()

Bstring Bstring::post ( char  c)

Definition at line 402 of file Bstring.cpp.

◆ post_rev()

Bstring Bstring::post_rev ( char  c)

Definition at line 436 of file Bstring.cpp.

◆ pre()

Bstring Bstring::pre ( char  c)

Definition at line 389 of file Bstring.cpp.

◆ pre_rev()

Bstring Bstring::pre_rev ( char  c)

Definition at line 421 of file Bstring.cpp.

◆ real()

double Bstring::real ( )

Definition at line 553 of file Bstring.cpp.

◆ remove()

Bstring Bstring::remove ( const char  c)

Definition at line 473 of file Bstring.cpp.

◆ replace()

Bstring Bstring::replace ( char  cold,
char  cnew 
)

Definition at line 465 of file Bstring.cpp.

◆ rfind() [1/2]

long Bstring::rfind ( const Bstring &  s)
inline

Definition at line 106 of file Bstring.h.

◆ rfind() [2/2]

long Bstring::rfind ( const Bstring &  s,
long  start 
)

Definition at line 582 of file Bstring.cpp.

◆ right()

Bstring Bstring::right ( long  len)

Definition at line 375 of file Bstring.cpp.

◆ split() [1/2]

Bstring * Bstring::split ( )

Definition at line 605 of file Bstring.cpp.

◆ split() [2/2]

Bstring * Bstring::split ( const Bstring &  delim)

Definition at line 630 of file Bstring.cpp.

◆ split_into_doubles()

vector< double > Bstring::split_into_doubles ( const Bstring &  delim)

Definition at line 673 of file Bstring.cpp.

◆ split_into_integers()

vector< long > Bstring::split_into_integers ( const Bstring &  delim)

Definition at line 657 of file Bstring.cpp.

◆ str()

string Bstring::str ( )
inline

Definition at line 42 of file Bstring.h.

◆ substr()

Bstring Bstring::substr ( long  start,
long  len 
)

Definition at line 332 of file Bstring.cpp.

◆ swap()

Bstring Bstring::swap ( const long  i,
const long  j 
)

Definition at line 485 of file Bstring.cpp.

◆ truncate()

Bstring Bstring::truncate ( const long  n)

Definition at line 503 of file Bstring.cpp.

◆ upper()

Bstring Bstring::upper ( )

Definition at line 324 of file Bstring.cpp.

◆ within()

Bstring Bstring::within ( char  c1,
char  c2 
)

Definition at line 450 of file Bstring.cpp.

Friends And Related Function Documentation

◆ operator+

Bstring operator+ ( const char *  c,
const Bstring &  s 
)
friend

Definition at line 689 of file Bstring.cpp.

Member Data Documentation

◆ next

Bstring* Bstring::next

Definition at line 31 of file Bstring.h.


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