LibBeamApi
0.3.8
|
#include <BString.h>
Public Member Functions | |
BString () | |
BString (const BString &string) | |
BString (const char *str) | |
BString (const char *str, unsigned int len) | |
BString (char ch) | |
BString (BInt v) | |
BString (BUInt v) | |
BString (BUInt64 v) | |
BString (double v) | |
~BString () | |
BString | copy () const |
Return an independant copy. More... | |
int | len () const |
Length of string. More... | |
const char * | retStr () const |
Ptr to char* representation. More... | |
char * | retStrDup () const |
Ptr to newly malloc'd char*. More... | |
int | retInt () const |
Return string as a int. More... | |
unsigned int | retUInt () const |
Return string as a int. More... | |
double | retDouble () const |
Return string as a double. More... | |
int | compare (const BString &string) const |
Compare strings. More... | |
int | compareWild (const BString &string) const |
Compare string to string with wildcards. More... | |
int | compareWildExpression (const BString &string) const |
Compare string to space deliminated patterns. More... | |
int | compareRegex (const BString &pattern, int ignoreCase=0) const |
Compare strings. More... | |
BString & | truncate (int len) |
Truncate to length len. More... | |
BString & | pad (int len) |
Pad to length len. More... | |
void | clear () |
Clear the string. More... | |
BString & | toUpper () |
Convert to uppercase. More... | |
BString & | toLower () |
Convert to lowercase. More... | |
BString | lowerFirst () |
Return string with lowercase first character. More... | |
void | removeNL () |
Remove if present NL from last char. More... | |
BString | justify (int leftMargin, int width) |
Justify the string to the given width. More... | |
BString | fixedLen (int length, int rightJustify=0) |
return string formated to fixed length More... | |
BString | firstLine () |
Return first line. More... | |
BString | translateChar (char ch, BString replace=" ") |
Translate character converting them to the given string. More... | |
BString | reverse () const |
Reverse character order. More... | |
BString | subString (int start, int len) const |
Returns substring. More... | |
int | del (int start, int len) |
Delete substring. More... | |
int | insert (int start, BString str) |
Insert substring. More... | |
int | append (const BString &str) |
Append a string. More... | |
BString | add (const BString &str) const |
Add strings returning result. More... | |
BString & | printf (const char *fmt,...) |
Formated print into the string. More... | |
int | find (char ch) const |
Find ch in string searching forwards. More... | |
int | find (BString str) const |
Find string in string searching forwards. More... | |
int | findReverse (char ch) const |
Find ch in string searching backwards. More... | |
BString | csvEncode () const |
Encode a string for CSV. More... | |
BString & | csvDecode (const BString str) |
Decode a string from CSV. More... | |
BString | base64Encode () const |
Encode a string to base64. More... | |
BError | base64Decode (BString &str) const |
Decode a string from base64. More... | |
BList< BString > | getTokenList (BString separators) |
Break string into tokens. More... | |
BList< BString > | getTokenList (char separator) |
Break string into tokens. More... | |
BString | removeSeparators (BString separators) |
Remove any char from sepatators from string. More... | |
BString | pullToken (BString terminators) |
Pull token from start of string. More... | |
BString | pullSeparators (BString separators) |
Pull separators from start of string. More... | |
BString | pullWord () |
Pull a word out of the head of the string. More... | |
BString | pullLine () |
Pull a line out of the head of the string. More... | |
BList< BString > | split (char splitChar) |
Split string into an array based on the character separator. More... | |
BString | dirname () |
BString | basename () |
BString | extension () |
BUInt32 | hash () const |
char & | get (int pos) |
const char & | get (int pos) const |
BString & | operator= (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+ (BInt i) const |
BString | operator+ (BUInt i) const |
BString | operator+ (BUInt64 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. More... | |
static BString | convert (BInt value) |
Converts int to string. More... | |
static BString | convert (BUInt value) |
Converts uint to string. More... | |
static BString | convert (double value, int eFormat=0) |
Converts double to string. More... | |
static BString | convert (BUInt64 value) |
Converts long long to string. More... | |
static BString | convertHex (BInt value) |
Converts int to string as hex value. More... | |
static BString | convertHex (BUInt value) |
Converts uint to string as hex value. More... | |
Protected Attributes | |
BRefData * | ostr |
Private Member Functions | |
void | init (const char *str) |
int | inString (int pos) const |
int | isSpace (char ch) const |
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 | ( | BInt | v | ) |
BString::BString | ( | BUInt | v | ) |
BString::BString | ( | BUInt64 | v | ) |
BString::BString | ( | double | v | ) |
BString::~BString | ( | ) |
int BString::append | ( | const BString & | str | ) |
Append a string.
BString BString::base64Encode | ( | ) | const |
Encode a string to base64.
BString BString::basename | ( | ) |
void BString::clear | ( | ) |
Clear the string.
int BString::compare | ( | const BString & | string | ) | const |
Compare strings.
int BString::compareRegex | ( | const BString & | pattern, |
int | ignoreCase = 0 |
||
) | 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.
|
static |
Converts char to string.
|
static |
Converts double to string.
BString BString::copy | ( | ) | const |
Return an independant copy.
BString BString::csvEncode | ( | ) | const |
Encode a string for CSV.
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 | ( | char | ch | ) | const |
Find ch in string searching forwards.
int BString::find | ( | BString | str | ) | const |
Find string in string searching forwards.
int BString::findReverse | ( | char | ch | ) | const |
Find ch in string searching backwards.
BString BString::firstLine | ( | ) |
Return first line.
BString BString::fixedLen | ( | int | length, |
int | rightJustify = 0 |
||
) |
return string formated to fixed length
char & BString::get | ( | int | pos | ) |
const char & BString::get | ( | int | pos | ) | const |
BUInt32 BString::hash | ( | ) | const |
|
private |
int BString::insert | ( | int | start, |
BString | str | ||
) |
Insert substring.
|
private |
|
private |
BString BString::justify | ( | int | leftMargin, |
int | width | ||
) |
Justify the string to the given width.
int BString::len | ( | ) | const |
Length of string.
BString BString::lowerFirst | ( | ) |
Return string with lowercase first character.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
char & BString::operator[] | ( | int | pos | ) |
BString & BString::pad | ( | int | len | ) |
Pad to length len.
BString & 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::pullWord | ( | ) |
Pull a word out of the head of the string.
void BString::removeNL | ( | ) |
Remove if present NL from last char.
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::reverse | ( | ) | const |
Reverse character order.
Split string into an array based on the character separator.
BString BString::subString | ( | int | start, |
int | len | ||
) | const |
Returns substring.
BString & BString::toLower | ( | ) |
Convert to lowercase.
BString & BString::toUpper | ( | ) |
Convert to uppercase.
Translate character converting them to the given string.
BString & BString::truncate | ( | int | len | ) |
Truncate to length len.
|
protected |