Documentation

DelimitersHandler
in package

This class creates an array of key values representing all characters up to the maximum delimiter character's codepoint. It uses the codepoint value of a given character as a lookup into the boolean array. An entry that returns true from the array is a delimiter character.

In theory this will technically work (at a memory cost) with the full UTF-16 range of characters but in practice the delimiters are limited to the standard ASCII range.

Tags
author

DeviceAtlas Limited

copyright

Copyright (c) DeviceAtlas Limited 2023. All Rights Reserved.

Table of Contents

Properties

$dC  : mixed

Methods

__construct()  : mixed
getAnyDelimiterChar()  : string
Return any delimiter char.
getCountDelimiters()  : mixed
isDelimiter()  : bool
Determines if the passed character is a delimiter.
parseDelimiters()  : mixed
Parse the delimiters chars and create a boolean array for all codepoints up to the last element of the List, as the List is order by codePoint.

Properties

Methods

__construct()

public __construct(mixed $codePointDelimiters) : mixed
Parameters
$codePointDelimiters : mixed

getAnyDelimiterChar()

Return any delimiter char.

public getAnyDelimiterChar() : string
Tags
throws
Exception
Return values
string

isDelimiter()

Determines if the passed character is a delimiter.

public isDelimiter(string $character) : bool
Parameters
$character : string

The character to determine if it is a delimiter.

Return values
bool

parseDelimiters()

Parse the delimiters chars and create a boolean array for all codepoints up to the last element of the List, as the List is order by codePoint.

private parseDelimiters( $codePointDelimiters) : mixed

All delimiters are marked as TRUE values. All other characters are marked as FALSE.

Parameters
$codePointDelimiters :

        
On this page

Search results