suyuan/vendor/topthink/think-helper
weiz e500652c37 first commit 2023-11-21 11:51:27 +08:00
..
.github/workflows first commit 2023-11-21 11:51:27 +08:00
src first commit 2023-11-21 11:51:27 +08:00
tests first commit 2023-11-21 11:51:27 +08:00
.gitignore first commit 2023-11-21 11:51:27 +08:00
LICENSE first commit 2023-11-21 11:51:27 +08:00
README.md first commit 2023-11-21 11:51:27 +08:00
composer.json first commit 2023-11-21 11:51:27 +08:00
phpunit.xml.dist first commit 2023-11-21 11:51:27 +08:00

README.md

thinkphp6 常用的一些扩展类库

基于PHP7.1+

PHP Composer

以下类库都在\\think\\helper命名空间下

Str

字符串操作

// 检查字符串中是否包含某些字符串
Str::contains($haystack, $needles)

// 检查字符串是否以某些字符串结尾
Str::endsWith($haystack, $needles)

// 获取指定长度的随机字母数字组合的字符串
Str::random($length = 16)

// 字符串转小写
Str::lower($value)

// 字符串转大写
Str::upper($value)

// 获取字符串的长度
Str::length($value)

// 截取字符串
Str::substr($string, $start, $length = null)