Documentation

Swift_CharacterReader_UsAsciiReader
in package
implements Swift_CharacterReader

Analyzes US-ASCII characters.

Tags
author

Chris Corbyn

Interfaces, Classes and Traits

Swift_CharacterReader
Analyzes characters for a specific character set.

Table of Contents

getCharPositions()  : int
Returns the complete character map.
getInitialByteSize()  : int
Returns the number of bytes which should be read to start each character.
getMapType()  : int
Returns mapType.
validateByteSequence()  : int
Returns an integer which specifies how many more bytes to read.

Methods

getCharPositions()

Returns the complete character map.

public getCharPositions(string $string, int $startOffset, array<string|int, mixed> &$currentMap, string &$ignoredChars) : int
Parameters
$string : string
$startOffset : int
$currentMap : array<string|int, mixed>
$ignoredChars : string
Return values
int

getInitialByteSize()

Returns the number of bytes which should be read to start each character.

public getInitialByteSize() : int
Return values
int

getMapType()

Returns mapType.

public getMapType() : int
Return values
int

mapType

validateByteSequence()

Returns an integer which specifies how many more bytes to read.

public validateByteSequence(string $bytes, int $size) : int

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.

Parameters
$bytes : string
$size : int
Return values
int

Search results