1
0
mirror of https://github.com/suk-ws/ph-Bookshelf.git synced 2024-12-05 09:26:52 +08:00

补充上一个 commit 缺失的 StringUtils 工具类

This commit is contained in:
A.C.Sukazyo Eyre 2021-05-05 19:58:13 +08:00
parent 8f43bdc2c1
commit a9b9a94275
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD

16
src/Utils/StringUtils.php Normal file
View File

@ -0,0 +1,16 @@
<?php
class StringUtils {
/**
* 删除所给字符串的换行符
*
* @param string $str 所给字符串
*
* @return string 剔除换行符的版本
*/
public static function rmEOL(string $str): string {
return str_replace(array("\r\n", "\r", "\n"), "", $str);
}
}