C# Class Pchp.Library.CharMap

Bitmap representig a set of Unicode characters.
Afficher le fichier Open project: iolevel/peachpie

Méthodes publiques

Méthode 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 méthode

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

Add() public méthode

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.
Résultat void

AddRange() public méthode

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.
Résultat void

AddUsingMask() public méthode

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.
Résultat void

AddUsingMask() public méthode

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.
Résultat void

AddUsingRegularMask() public méthode

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 '-'.
Résultat void

CharMap() public méthode

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

CharMap() public méthode

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

ClearAll() public méthode

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
Résultat void

Contains() public méthode

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.
Résultat bool

Remove() public méthode

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

RemoveRange() public méthode

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.
Résultat void

ToString() public méthode

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.
Résultat string