<!DOCTYPE HTML PUBLIC> <HTML> <TITLE>Xbase DBMS Chapter 14</TITLE> <BODY BGCOLOR=#FFFFFF> <H1><p align="center">String Methods</p></H1> <p align="center">Chapter Updated 2/12/99</p><hr> This chapter lists the string methods.<br><br> <TABLE BORDER> <CAPTION ALIGN="TOP"><h3>String Method List</h3></CAPTION> <TR VALIGN="BASELINE"> <TR><TH ALIGN="LEFT">Method<TD>Description <TR><TH ALIGN="LEFT">xbString()<TD>Class Constructor <TR><TH ALIGN="LEFT">xbString(size_t size)<TD>Constructor, allocates space of size <TR><TH ALIGN="LEFT">xbString(const char *s)<TD>Constructor, initialized to string s <TR><TH ALIGN="LEFT">xbString(const char *s, size_t maxlen<TD> Constructor, initialized to string s, with minimal string buf size of max_len <TR><TH ALIGN="LEFT">~xbString()<TD>Class Destructor <TR><TH ALIGN="LEFT">void ctor(const char *s)<TD>Set string to s <TR><TH ALIGN="LEFT">xbString &opertor=(const xbString &s)<br> xbString &operator=(const char *s)<TD>Set string to s <TR><TH ALIGN="LEFT">bool isNull() const<TD>not sure what this one does <TR><TH ALIGN="LEFT">bool isEmpty() const<TD>Returns true if empty, otherwise returns false <TR><TH ALIGN="LEFT">size_t len() const<TD>Returns length of string <TR><TH ALIGN="LEFT">void resize(size_t size)<TD>Resize the string to size <TR><TH ALIGN="LEFT">xbString copy() const<TD>Used to copy a string <TR><TH ALIGN="LEFT">xbSting &sprintf(const char * format, ... )<TD> Used to format a string <TR><TH ALIGN="LEFT">void setNum(long num)<TD>not sure what this one does <TR><TH ALIGN="LEFT">xbString& assign(const xbString& str, size_t pos = 0, int n = 1)<TD>not sure what this one does <TR><TH ALIGN="LEFT">char operator[](int n)<TD>Returns char in position n <TR><TH ALIGN="LEFT">xbString &operator+=(const char *s)<br> xbSting &operator+=(char c)<TD>Concatonate data to string <TR><TH ALIGN="LEFT">void put_at(size_t pos, char c)<TD>Put character c at position pos <TR><TH ALIGN="LEFT">const char *getData() const<TD>Returns the string <TR><TH ALIGN="LEFT">void toLowerCase()<TD>Converts string to lower case <TR><TH ALIGN="LEFT">const char *pos(char c)<TD>Locate character in string <TR><TH ALIGN="LEFT">bool operator==(const xbString &s1, const xbString &s2)<TD> Compare string == <TR><TH ALIGN="LEFT">bool operator!=(const xbString &s1, const xbString &s2)<TD> Compare string != <TR><TH ALIGN="LEFT"> xbString operator+(const xbString &s1, const xbString &s2)<br> xbString operator+(const xbString &s1, const char *s2)<br> xbString operator+(const char *s1, const xbString &s2)<br> xbString operator+(const xbString &s1, char c2)<br> xbString operator+(char c1, const xbString &s2)<TD>Concatonate two strings togethor </TABLE> <BR><hr> <A HREF="mailto:xbase@startech.keller.tx.us"> Send me mail - xbase@startech.keller.tx.us</A><br> <p>(c)1997 StarTech <p><img src="xbase.jpg"><br><hr> </BODY> </HTML>