C# Class Pchp.Library.CharMap

Bitmap representig a set of Unicode characters.
Mostrar archivo Open project: iolevel/peachpie

Public Methods

Method Description
Add ( char c ) : void

Adds character to the set.

Add ( string str ) : void

Adds all characters contained in a specified string.

AddRange ( char first, char last ) : void

Adds a range of characters to the set.

AddUsingMask ( string mask ) : void

Adds characters matching given mask.

The mask may contain single characters as well as intervals "a..b", where a, b are characters and a is less than or equal to b.

There are no characters delimiting elements of the mask.

If the mask is not valid as a whole its valid parts are processed.

AddUsingMask ( string mask, string separator ) : void

Adds characters using a mask with specified interval bounds separator.

AddUsingRegularMask ( string mask, int start, int end, char separator ) : void

Adds character range given a regular-expression like mask. E.g. [a-zA-Z].

CharMap ( int size ) : System

Creates a new instance of CharMap.

CharMap ( uint map ) : System

Creates a new instance of CharMap based on specified map.

ClearAll ( ) : void

Clears all bits in the map.

Doesn't necessarily lead to clearing the whole map. Clears the map up to the last bit ever set.

Contains ( char c ) : bool

Retrieves whether a character belongs to the set.

Remove ( char c ) : void

Removes character from the set.

RemoveRange ( char first, char last ) : void

Removes a range of characters from the set.

ToString ( char first, char last, bool complement ) : string

Accumulates all characters contained or not contained in the set to the string in ascending order.

Method Details

Add() public method

Adds character to the set.
is not mapped by this instance.
public Add ( char c ) : void
c char The character to be added.
return void

Add() public method

Adds all characters contained in a specified string.
Some character within is not mapped by this instance.
public Add ( string str ) : void
str string The string which characters to add. Can be a null reference.
return void

AddRange() public method

Adds a range of characters to the set.
or are not mapped by this instance. The is less than the .
public AddRange ( char first, char last ) : void
first char The lower bound of the range.
last char The upper bound of the range.
return void

AddUsingMask() public method

Adds characters matching given mask.

The mask may contain single characters as well as intervals "a..b", where a, b are characters and a is less than or equal to b.

There are no characters delimiting elements of the mask.

If the mask is not valid as a whole its valid parts are processed.

is not valid mask. An item of is not convertible to character. Any character of is not mapped by this instance.
public AddUsingMask ( string mask ) : void
mask string The mask of characters to be added. Any collection with items convertible to the type.
return void

AddUsingMask() public method

Adds characters using a mask with specified interval bounds separator.
public AddUsingMask ( string mask, string separator ) : void
mask string The mask.
separator string The separator.
return void

AddUsingRegularMask() public method

Adds character range given a regular-expression like mask. E.g. [a-zA-Z].
public AddUsingRegularMask ( string mask, int start, int end, char separator ) : void
mask string The mask.
start int An index of '[' character in the mask where the range starts.
end int An index of the last character of the range. Usually the index of ']' character.
separator char The separator character. Usually '-'.
return void

CharMap() public method

Creates a new instance of CharMap.
public CharMap ( int size ) : System
size int The number of characters to be mapped.
return System

CharMap() public method

Creates a new instance of CharMap based on specified map.
public CharMap ( uint map ) : System
map uint The bits used for character map.
return System

ClearAll() public method

Clears all bits in the map.
Doesn't necessarily lead to clearing the whole map. Clears the map up to the last bit ever set.
public ClearAll ( ) : void
return void

Contains() public method

Retrieves whether a character belongs to the set.
is not mapped by this instance.
public Contains ( char c ) : bool
c char The character to be tested.
return bool

Remove() public method

Removes character from the set.
is not mapped by this instance.
public Remove ( char c ) : void
c char The character to be removed.
return void

RemoveRange() public method

Removes a range of characters from the set.
or are not mapped by this instance. The is less than the .
public RemoveRange ( char first, char last ) : void
first char The lower bound of the range.
last char The upper bound of the range.
return void

ToString() public method

Accumulates all characters contained or not contained in the set to the string in ascending order.
or are not mapped by this instance.
public ToString ( char first, char last, bool complement ) : string
first char The lower bound.
last char The upper bound.
complement bool Whether to return characters not contained in the string.
return string