定制 dnaber/string-theory 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dnaber/string-theory

Composer 安装命令:

composer require dnaber/string-theory

包简介

Objective multi-byte string handling

README 文档

README

Objective multi-byte string handling in PHP.

public API

StringTheory\Type\StringType

The basic string interface.

StringTheory\Type\MbString

Implementation of StringType for multi-byte strings. Default encoding is set to UTF-8.

Example:

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.

StringTheory\Model\MbScanner

Implementation of the Scanner interface for multi-byte strings. Default encoding is set to UTF-8.

Example:

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

统计信息

  • 总下载量: 451
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固