codeinc/utf8-sanitizer
最新稳定版本:1.3
Composer 安装命令:
composer require codeinc/utf8-sanitizer
包简介
Sanitize UTF-8 strings
README 文档
README
A simple UTF-8 sanitizer written in PHP 8 using iconv. This code is based after this StackOverflow response and the W3C UTF-8 verification recommended regular expression.
Usage
<?php $sanitizer = new \CodeInc\Utf8Sanitizer\Utf8Sanitizer(); // validates a UTF-8 string $sanitizer->isValidUtf8("A valid UTF-8 string."); // true // sanitizes a string $validString = $sanitizer->sanitize("An invalid UTF-8 string.");
Installation
This library is available through Packagist and can be installed using Composer:
composer require codeinc/utf8-sanitizer
License
This library is published under the MIT license (see the LICENSE file).
统计信息
- 总下载量: 512
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-25