PHP Class Swift_CharacterReader_UsAsciiReader, Halite

Author: Chris Corbyn
Inheritance: implements Swift_CharacterReader
Show file Open project: HaliteChallenge/Halite

Public Methods

Method Description
getCharPositions ( string $string, integer $startOffset, array &$currentMap, string &$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 mapType.
validateByteSequence ( string $bytes, integer $size ) : integer Returns an integer which specifies how many more bytes to read.

Method Details

getCharPositions() public method

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

getInitialByteSize() public method

Returns the number of bytes which should be read to start each character.
public getInitialByteSize ( ) : integer
return integer

getMapType() public method

Returns mapType.
public getMapType ( ) : integer
return integer mapType

validateByteSequence() public method

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 ( string $bytes, integer $size ) : integer
$bytes string
$size integer
return integer