#include <stdexcept>
#include <stdio.h>
#include "SubString.h"
#include "RCArray.h"
Include dependency graph for String.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Compounds | |
class | String |
This class is a container for strings composed of 8-bit ASCII characters. More... | |
Typedefs | |
typedef RCArray< char > | CharArray |
Define a type for a growable reference counted array object that implements copy-on-write semantics. | |
Functions | |
String | operator+ (const char *Cstr, String &s) |
Global operator +: "abcd" + String(" efgh"). | |
String | operator+ (const char ch, String &s) |
Global operator +: Concatenate a character and a String object. | |
bool | operator== (const char *Cstr, String &s) |
Global Cstr == String operator, where Cstr is a "C" string. | |
bool | operator!= (const char *Cstr, String &s) |
Global Cstr != String operator, where Cstr is a "C" string. | |
bool | operator<= (const char *Cstr, String &s) |
Cstr <= s: however, we must use the comparision s to Cstr. | |
bool | operator>= (const char *Cstr, String &s) |
Cstr >= s: however, we must use the comparision s to Cstr. | |
bool | operator< (const char *Cstr, String &s) |
Cstr < s: however, we must use the comparision s to Cstr. | |
bool | operator> (const char *Cstr, String &s) |
Cstr > s: however, we must use the comparision s to Cstr. |
You may use this source code without limitation and without fee as long as you include:
This software was written and is copyrighted by Ian Kaplan, Bear Products International, www.bearcave.com, 2001, 2002, 2003This software is provided "as is", without any warrenty or claim as to its usefulness. Anyone who uses this source code uses it at their own risk. Nor is any support provided by Ian Kaplan and Bear Products International.
Please send any bug fixes or suggested source changes to:
Definition in file String.h.
Typedef Documentation
|
Define a type for a growable reference counted array object that implements copy-on-write semantics.
Definition at line 42 of file String.h. Referenced by String::String(). |
|
Global Cstr != String operator, where Cstr is a "C" string.
Definition at line 459 of file String.C.
00460 { 00461 return (s != Cstr); 00462 } // operator != |
|
Global operator +: Concatenate a character and a String object.
|
|
Global operator +: "abcd" + String(" efgh"). This operator supports an operation like "abcd" + String(" efgh"). The result of this operator would be a String object containing "abcd efgh". Definition at line 409 of file String.C.
00410 { 00411 String tmp; 00412 if (Cstr != 0) { 00413 tmp = Cstr; 00414 } 00415 00416 tmp += s; 00417 return tmp; 00418 } // global operator + |
|
Cstr < s: however, we must use the comparision s to Cstr. So this expression is true if s > Cstr. Definition at line 495 of file String.C.
00496 { 00497 return (s > Cstr); 00498 } // global operator < |
|
Cstr <= s: however, we must use the comparision s to Cstr. So this expression is true if s >= Cstr. Definition at line 471 of file String.C.
00472 { 00473 return (s >= Cstr); 00474 } // global operator <= |
|
Global Cstr == String operator, where Cstr is a "C" string.
Definition at line 449 of file String.C.
00450 { 00451 return (s == Cstr); 00452 } // global operator == |
|
Cstr > s: however, we must use the comparision s to Cstr. So this expression is true if s < Cstr. Definition at line 507 of file String.C.
00508 { 00509 return (s < Cstr); 00510 } // global operator > |
|
Cstr >= s: however, we must use the comparision s to Cstr. So this expression is true if s <= Cstr. Definition at line 483 of file String.C.
00484 { 00485 return (s <= Cstr); 00486 } // global operator >= |