zerustech / string
dev-master / 1.0.x-dev
2016-10-09 07:10 UTC
Requires
- php: >=5.4
- zerustech/io: >=2.1.0-dev
This package is auto-updated.
Last update: 2024-09-09 15:31:32 UTC
README
ZerusTech 字符串组件
ZerusTech 字符串组件 是一个库,提供用于操作字符串的类和工具。
安装
您可以通过两种不同的方式安装此组件:
通过 Composer 安装
$ cd <project-root-directory> $ composer require zerustech/string
使用官方 Git 仓库 zerustech/string
示例
UTF32
此类代表 UTF32 编码方案。
<?php
require_once __DIR__.'/vendor/autoload.php';
use ZerusTech\Component\String\Unicode\UTF32;
// Converts UTF-32 code 0x20ac to UTF-8
UTF32::convertToUTF8(0x20ac); // 'e282ac'
// Converts UTF-32 code 0x20ac to UTF-16
UTF32::convertToUTF16(0x20ac); // '20ac'
参考
许可
ZerusTech 字符串组件 在 MIT 许可证 下发布。