String Methods

Chapter Updated 2/12/99


This chapter lists the string methods.

String Method List

MethodDescription
xbString()Class Constructor
xbString(size_t size)Constructor, allocates space of size
xbString(const char *s)Constructor, initialized to string s
xbString(const char *s, size_t maxlen Constructor, initialized to string s, with minimal string buf size of max_len
~xbString()Class Destructor
void ctor(const char *s)Set string to s
xbString &opertor=(const xbString &s)
xbString &operator=(const char *s)
Set string to s
bool isNull() constnot sure what this one does
bool isEmpty() constReturns true if empty, otherwise returns false
size_t len() constReturns length of string
void resize(size_t size)Resize the string to size
xbString copy() constUsed to copy a string
xbSting &sprintf(const char * format, ... ) Used to format a string
void setNum(long num)not sure what this one does
xbString& assign(const xbString& str, size_t pos = 0, int n = 1)not sure what this one does
char operator[](int n)Returns char in position n
xbString &operator+=(const char *s)
xbSting &operator+=(char c)
Concatonate data to string
void put_at(size_t pos, char c)Put character c at position pos
const char *getData() constReturns the string
void toLowerCase()Converts string to lower case
const char *pos(char c)Locate character in string
bool operator==(const xbString &s1, const xbString &s2) Compare string ==
bool operator!=(const xbString &s1, const xbString &s2) Compare string !=
xbString operator+(const xbString &s1, const xbString &s2)
xbString operator+(const xbString &s1, const char *s2)
xbString operator+(const char *s1, const xbString &s2)
xbString operator+(const xbString &s1, char c2)
xbString operator+(char c1, const xbString &s2)
Concatonate two strings togethor


Send me mail - xbase@startech.keller.tx.us

(c)1997 StarTech