PHP Interface Swift_CharacterReader, Halite

Author: Chris Corbyn
Author: Xavier De Cock ([email protected])
Afficher le fichier Open project: HaliteChallenge/Halite Interface Usage Examples

Méthodes publiques

Méthode Description
getCharPositions ( string $string, integer $startOffset, array &$currentMap, mixed &$ignoredChars ) : integer Returns the complete character map.
getInitialByteSize ( ) : integer Returns the number of bytes which should be read to start each character.
getMapType ( ) : integer Returns the mapType, see constants.
validateByteSequence ( integer[] $bytes, integer $size ) : integer Returns an integer which specifies how many more bytes to read.

Method Details

getCharPositions() public méthode

Returns the complete character map.
public getCharPositions ( string $string, integer $startOffset, array &$currentMap, mixed &$ignoredChars ) : integer
$string string
$startOffset integer
$currentMap array
$ignoredChars mixed
Résultat integer

getInitialByteSize() public méthode

For fixed width character sets this should be the number of octets-per-character. For multibyte character sets this will probably be 1.
public getInitialByteSize ( ) : integer
Résultat integer

getMapType() public méthode

Returns the mapType, see constants.
public getMapType ( ) : integer
Résultat integer

validateByteSequence() public méthode

A positive integer indicates the number of more bytes to fetch before invoking this method again. A value of zero means this is already a valid character. A value of -1 means this cannot possibly be a valid character.
public validateByteSequence ( integer[] $bytes, integer $size ) : integer
$bytes integer[]
$size integer
Résultat integer