class PCaselessString

This class is a variation of a string that ignores case.

Inheritance:


Public Methods

[more] PCaselessString ()
Create a new, empty, caseless string
[more] PCaselessString ( const char* cstr )
Create a new caseless string, initialising it to the characters in the C string provided.
[more] PCaselessString ( const PString & str )
Create a caseless string, with a reference to the characters in the normal PString provided.
[more]PCaselessString& operator= ( const PString & str )
Assign the string to the current object.
[more]PCaselessString& operator= ( const char* cstr )
Assign the C string to the current object.
[more]PCaselessString& operator= ( char ch )
Assign the character to the current object.
[more]virtual PObject* Clone () const
Make a complete duplicate of the string.


Inherited from PString:

Public Methods

Construction

Overrides from class PObject

Overrides from class PContainer

Size/Length functions

Concatenation operators *

Comparison operators

Search & replace functions

Sub-string functions

Conversion functions


Inherited from PCharArray:


Inherited from PBaseArray:

Public Methods

New functions for class


Inherited from PAbstractArray:

Protected Fields

oPINDEX elementSize
ochar* theArray
oBOOL allocatedDynamically


Inherited from PContainer:

Public Methods

Common functions for containers

Protected Methods

ovirtual void DestroyContents()
ovirtual void AssignContents(const PContainer & c)
ovoid CopyContents(const PContainer & c)
ovoid CloneContents(const PContainer* src)
ovoid Destruct()


Inherited from PObject:

Public Methods

Run Time Type functions

I/O functions

Public Members

Comparison functions


Documentation

This class is a variation of a string that ignores case. Thus in all standard comparison (==, < etc) and search (Find() etc) functions the case of the characters and strings is ignored.

The characters in the string still maintain their case. Only the comparison operations are affected. So printing etc will still display the string as entered.

o PCaselessString()
Create a new, empty, caseless string

o PCaselessString( const char* cstr )
Create a new caseless string, initialising it to the characters in the C string provided.
Parameters:
- cstr C string to initialise the caseless string from.

o PCaselessString( const PString & str )
Create a caseless string, with a reference to the characters in the normal PString provided. A PCaselessString may also be provided to this constructor.
Parameters:
- str String to initialise the caseless string from.

oPCaselessString& operator=( const PString & str )
Assign the string to the current object. The current instance then becomes another reference to the same string in the str parameter.

Parameters:
- str New string to assign.
Returns:
reference to the current PString object.

oPCaselessString& operator=( const char* cstr )
Assign the C string to the current object. The current instance then becomes a unique reference to a copy of the cstr parameter. The cstr parameter is typically a literal string, eg:
          myStr = "fred";
Parameters:
- cstr C string to assign.
Returns:
reference to the current PString object.

oPCaselessString& operator=( char ch )
Assign the character to the current object. The current instance then becomes a unique reference to a copy of the character parameter. eg:
          myStr = 'A';
Parameters:
- ch Character to assign.
Returns:
reference to the current PString object.

ovirtual PObject* Clone() const
Make a complete duplicate of the string. Note that the data in the array of characters is duplicated as well and the new object is a unique reference to that data.


Direct child classes:
PColourConverterRegistration

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.