julkwel/stringtools

PHP 字符串工具

v1.0.1 2022-05-09 18:11 UTC

This package is auto-updated.

Last update: 2024-09-09 23:35:27 UTC


README

PHP 字符串工具,特殊字符清理器和字符串比较 ... [工作中]

安装

$ composer require julkwel/stringtools

使用

- 字符串特殊字符清理器

$textToClean = "ÉÉÊÊÎÎÎî ëŷ we are with spécïal charactêrs and w'ill clean";
\Julkwel\StringTools\StrCleaner::cleanString($textToClean)

Output: "eeeeiiii ey we are with special characters and will clean"

- 字符串比较

  1. 简单使用
echo \Julkwel\StringTools\StrCompare::isStringIsEquals("test", "test");

Output: true
  1. 特殊字符移除使用
echo \Julkwel\StringTools\StrCompare::isStringIsEquals("têst", "test");

Output: true

随时欢迎联系我说声你好!