2017 © Pedro Peláez
 

library string-theory

Objective multi-byte string handling

image

dnaber/string-theory

Objective multi-byte string handling

  • Sunday, October 23, 2016
  • by dnaber-de
  • Repository
  • 0 Watchers
  • 0 Stars
  • 445 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

StringType Theory

Objective multi-byte string handling in PHP., (*1)

public API

StringTheory\Type\StringType

The basic string interface., (*2)

StringTheory\Type\MbString

Implementation of StringType for multi-byte strings. Default encoding is set to UTF-8., (*3)

Example:, (*4)


use StringTheory\Type; $string = new Type\MbString( '苍天有' ); echo $string[ 0 ]; // 苍 echo $string[ 2 ]; // 有 var_dump( isset( $string[ 3 ] ) ); // false

StringTheory\Model\Scanner

Basic scanner interface that allows a character sequential iteration of a string., (*5)

StringTheory\Model\MbScanner

Implementation of the Scanner interface for multi-byte strings. Default encoding is set to UTF-8., (*6)

Example:, (*7)

use StringTheory\Model;

$scanner = new Model\MbScanner( 'abc' );

echo $scanner->current(); // a

$scanner->next();
$scanner->next();
echo $scanner->current(); // c

$scanner->previous();
echo $scanner->current(); // b

The Versions

23/10 2016

dev-master

9999999-dev

Objective multi-byte string handling

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-mbstring *

 

string scanner utf8 multi-byte

05/03 2016

1.0.0-alpha

1.0.0.0-alpha

Objective multi-byte string handling

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-mbstring *

 

string scanner utf8 multi-byte