Main Page | Class Hierarchy | Class List | File List | Class Members

FluSimpleString Class Reference

A simple string object that works a lot like the STL string object. More...

#include <FluSimpleString.h>

List of all members.

Public Member Functions

 FluSimpleString ()
 Default constructor: sets to empty string ("").

 FluSimpleString (unsigned int len)
 Allocates the string to be of length len. Does not set the buffer to any initial value.

 FluSimpleString (const char *s)
 String copy constructor.

 FluSimpleString (const FluSimpleString &s)
 Copy constructor.

 ~FluSimpleString ()
 Default destructor.

const char * c_str () const
 a c-style nul terminated pointer to the string

int size () const
 how long the string is

char & operator[] (int i)
 Array operator.

char operator[] (int i) const
 Array operator.

FluSimpleString substr (int pos, int len) const
 the indicated substring of this string

void upcase ()
 Convert this string to uppercase.

void downcase ()
 Convert this string to lowercase.

int find (char c) const
 the first index of character c in this string, or -1 if is not in this string

int rfind (char c) const
 the last index of character c in this string, or -1 if is not in this string

int compare (const FluSimpleString &s) const
 0 if this string is equal to s, -1 if this string is lexigraphically less than s, 1 if this string is lexigraphically greater than s (uses c-std function strcmp )

int casecompare (const FluSimpleString &s) const
 Same as compare(), except ignores the case of the string.

void push_back (char c)
 Add character c to the end of the string.

void copy (const FluSimpleString &s)
 Alias for the = operator.

void copy (const char *s)
 Alias for the = operator.

void copy (const FluSimpleString &s, unsigned int start, unsigned int len)
 Copy the substring of s to this string.

void copy (const char *s, unsigned int start, unsigned int len)
 Copy the substring of s to this string.

FluSimpleStringoperator= (const char *s)
 Copy operator.

FluSimpleStringoperator= (FluSimpleString s)
 Copy operator.

bool operator< (const FluSimpleString &s) const
 Less-than operator.

bool operator> (const FluSimpleString &s) const
 Greater-than operator.

bool operator== (const FluSimpleString &s) const
 Equality operator.

bool operator!= (const FluSimpleString &s) const
 Inequality operator.

FluSimpleStringoperator+= (const FluSimpleString &s)
 Concatenate assignment operator.

FluSimpleStringoperator+= (const char *s)
 Concatenate assignment operator.


Friends

int compare (const FluSimpleString &s1, const FluSimpleString &s2)
 0 if this string is equal to s, -1 if this string is lexigraphically less than s, 1 if this string is lexigraphically greater than s (uses c-std function strcmp )

int casecompare (const FluSimpleString &s1, const FluSimpleString &s2)
 Same as compare(), except ignores the case of the string.

FluSimpleString operator+ (const char *s1, FluSimpleString s2)
 Concatenate operator.

FluSimpleString operator+ (FluSimpleString s1, const char *s2)
 Concatenate operator.

FluSimpleString operator+ (FluSimpleString s1, FluSimpleString s2)
 Concatenate operator.


Detailed Description

A simple string object that works a lot like the STL string object.


The documentation for this class was generated from the following file:
Generated on Fri Nov 5 12:41:33 2004 for FLTK Utility Library and Widget Collection (FLU) by doxygen 1.3.5