Sitemap | Search || Zen Spider Website
/ Satori
/ Satori Class Index
/ Class String
Class String
-
- Description:
- Define a "plug & play" string class in order to catch any and all improper // use of a string type such as non terminated strings, range checking, etc.
-
-
- Public Methods:
-
-
-
- String
- (const char * aString = "");
- I am the default and standard constructor for string. I
- have a default value of "" so that I may be used with arrays
- and other situations needing it. I create a copy of the
- string passed to me.
- CAUTION: I will bomb if aString is a NULL pointer.
-
-
-
-
- String
- (const char * aString, const UInteger & aSize);
- I am a conversion constructor. I am used in the case of
- not having a NULL terminated string or when you have the
- need to pull out a substring of known size.
- CAUTION: I will bomb if aString is a NULL pointer.
-
-
-
-
- String
- (const String & aString);
- I am the copy constructor. I will create a copy of the
- string object passed to me.
-
-
-
-
- ~String
- ();
- I am the destructor. I deallocate the memory used and
- sets everything back to a safe state.
-
-
- String &
-
- operator =
- (const char * aString);
- I am a conversion = operator. It will copy a low level
- string's contents into the current string, deleting the
- current contents if necessary.
- CAUTION: I will bomb if aString is a NULL pointer.
-
-
- String &
-
- operator =
- (const String & aString);
- I am the standard operator =(). I will create a copy
- of aString, deleting my current contents if necessary.
-
-
- char *
-
- asCString
- ();
- I am an explicit conversion constructor. I am used when you
- absolutely have to use me as a char *.
-
-
- char &
-
- operator[]
- (const UInteger & index);
- I am the subindexing operator. I will allow you to
- access my individual characters by their array index.
- As always C/++ arrays are zero based.
- CAUTION: I will bomb if index > mySize
-
-
- UInteger
-
- length
- ();
-
-
- Boolean operator
-
- <
- (const String & aString);
-
-
- Boolean operator
-
- >
- (const String & aString);
-
-
- Boolean operator
-
- <=
- (const String & aString);
-
-
- Boolean operator
-
- >=
- (const String & aString);
-
-
- Boolean operator
-
- =
- (const String & aString);
-
-
- Boolean operator
-
- !=
- (const String & aString);
-
-
- String &
-
- operator +=
- (const String & aString);
-
-
- String operator
-
- (const String & aString);
- services
I am an internal utility used by the default constructor
and assignment operator. I do all the work of copying a
low level string. I was created for safety and maintenance
reasons.
CAUTION: I will bomb if aString is NULL _OR_ if aString == myString
data
-
-
- Protected Methods:
-
- Protected Members:
-
- UInteger
-
- mySize;
-
-
- char *
-
- myString;
-
-
-
Sitemap | Search || Zen Spider Website
/ Satori
/ Satori Class Index
/ Class String