![Stringy](http://danielstjules.com/github/stringy-logo.png)
A PHP string manipulation library with multibyte support. Compatible with PHP
5.4+, PHP 7+, and HHVM.
``` php
s('string')->toTitleCase()->ensureRight('y') == 'Stringy'
```
Refer to the [1.x branch](https://github.com/danielstjules/Stringy/tree/1.x) or
[2.x branch](https://github.com/danielstjules/Stringy/tree/2.x) for older
documentation.
[![Build Status](https://api.travis-ci.org/danielstjules/Stringy.svg?branch=master)](https://travis-ci.org/danielstjules/Stringy)
[![Total Downloads](https://poser.pugx.org/danielstjules/stringy/downloads)](https://packagist.org/packages/danielstjules/stringy)
[![License](https://poser.pugx.org/danielstjules/stringy/license)](https://packagist.org/packages/danielstjules/stringy)
* [Why?](#why)
* [Installation](#installation)
* [OO and Chaining](#oo-and-chaining)
* [Implemented Interfaces](#implemented-interfaces)
* [PHP 5.6 Creation](#php-56-creation)
* [StaticStringy](#staticstringy)
* [Class methods](#class-methods)
* [create](#createmixed-str--encoding-)
* [Instance methods](#instance-methods)
<table>
<tr>
<td><a href="#appendstring-string">append</a></td>
<td><a href="#atint-index">at</a></td>
<td><a href="#betweenstring-start-string-end--int-offset">between</a></td>
<td><a href="#camelize">camelize</a></td>
</tr>
<tr>
<td><a href="#chars">chars</a></td>
<td><a href="#collapsewhitespace">collapseWhitespace</a></td>
<td><a href="#containsstring-needle--boolean-casesensitive--true-">contains</a></td>
<td><a href="#containsallarray-needles--boolean-casesensitive--true-">containsAll</a></td>
</tr>
<tr>
<td><a href="#containsanyarray-needles--boolean-casesensitive--true-">containsAny</a></td>
<td><a href="#countsubstrstring-substring--boolean-casesensitive--true-">countSubstr</a></td>
<td><a href="#dasherize">dasherize</a></td>
<td><a href="#delimitint-delimiter">delimit</a></td>
</tr>
<tr>
<td><a href="#endswithstring-substring--boolean-casesensitive--true-">endsWith</a></td>
<td><a href="#endswithanystring-substrings--boolean-casesensitive--true-">endsWithAny</a></td>
<td><a href="#ensureleftstring-substring">ensureLeft</a></td>
<td><a href="#ensurerightstring-substring">ensureRight</a></td>
</tr>
<tr>
<td><a href="#firstint-n">first</a></td>
<td><a href="#getencoding">getEncoding</a></td>
<td><a href="#haslowercase">hasLowerCase</a></td>
<td><a href="#hasuppercase">hasUpperCase</a></td>
</tr>
<tr>
<td><a href="#htmldecode">htmlDecode</a></td>
<td><a href="#htmlencode">htmlEncode</a></td>
<td><a href="#humanize">humanize</a></td>
<td><a href="#indexofstring-needle--offset--0-">indexOf</a></td>
</tr>
<tr>
<td><a href="#indexoflaststring-needle--offset--0-">indexOfLast</a></td>
<td><a href="#insertint-index-string-substring">insert</a></td>
<td><a href="#isalpha">isAlpha</a></td>
<td><a href="#isalphanumeric">isAlphanumeric</a></td>
</tr>
<tr>
<td><a href="#isbase64">isBase64</a></td>
<td><a href="#isblank">isBlank</a></td>
<td><a href="#ishexadecimal">isHexadecimal</a></td>
<td><a href="#isjson">isJson</a></td>
</tr>
<tr>
<td><a href="#islowercase">isLowerCase</a></td>
<td><a href="#isserialized">isSerialized</a></td>
<td><a href="#isuppercase">isUpperCase</a></td>
<td><a href="#lastint-n">last</a></td>
</tr>
<tr>
<td><a href="#length">length</a></td>
<td><a href="#lines">lines</a></td>
<td><a href="#longestcommonprefixstring-otherstr">longestCommonPrefix</a></td>
<td><a href="#longestcommonsuffixstring-otherstr">longestCommonSuffix</a></td>
</tr>
<tr>
<td><a href="#longestcommonsubstringstring-otherstr">longestCommonSubstring</a></td>
<td><a href="#lowercasefirst">lowerCaseFirst</a></td>
<td><a href="#padint-length--string-padstr-----string-padtype--right-">pad</a></td>
<td><a href="#padbothint-length--string-padstr----">padBoth</a></td>
</tr>
<tr>
<td><a href="#padleftint-length--string-padstr----">padLeft</a></td>
<td><a href="#padrightint-length--string-padstr----">padRight</a></td>
<td><a href="#prependstring-string">prepend</a></td>
<td><a href="#regexreplacestring-pattern-string-replacement--string-options--msr">regexReplace</a></td>
</tr>
<tr>
<td><a href="#removeleftstring-substring">removeLeft</a></td>
<td><a href="#removerightstring-substring">removeRight</a></td>
<td><a href="#repeatint-multiplier">repeat</a></td>
<td><a href="#replacestring-search-string-replacement">replace</a></td>
</tr>
<tr>
<td><a href="#reverse">reverse</a></td>
<td><a href="#safetruncateint-length--string-substring---">safeTruncate</a></td>
<td><a href="#shuffle">shuffle</a></td>
<td><a href="#slugify-string-replacement-----string-language--en">slugify</a></td>
</tr>
<tr>
<td><a href="#sliceint-start--int-end-">slice</a></td>
<td><a href="#splitstring-pattern--int-limit-">split</a></td>
<td><a href="#startswithstring-substring--boolean-casesensitive--true-">startsWith</a></td>
<td><a href="#startswithanystring-substrings--boolean-casesensitive--true-">startsWithAny</a></td>
</tr>
<tr>
<td><a href="#stripwhitespace">stripWhitespace</a></td>
<td><a href="#substrint-start--int-length-">substr</a></td>
<td><a href="#surroundstring-substring">surround</a></td>
<td><a href="#swapcase">swapCase</a></td>
</tr>
<tr>
<td><a href="#tidy">tidy</a></td>
<td><a href="#titleize-array-ignore">titleize</a></td>
<td><a href="#toascii-string-language--en--bool-removeunsupported--true-">toAscii</a></td>
<td><a href="#toboolean">toBoolean</a></td>
</tr>
<tr>
<td><a href="#tolowercase">toLowerCase</a></td>
<td><a href="#tospaces-tablength--4-">toSpaces</a></td>
<td><a href="#totabs-tablength--4-">toTabs</a></td>
<td><a href="#totitlecase">toTitleCase</a></td>
</tr>
<tr>
<td><a href="#touppercase">toUpperCase</a></td>
<td><a href="#trim-string-chars">trim</a></td>
<td><a href="#trimleft-string-chars">trimLeft</a></td>
<td><a href="#trimright-string-chars">trimRight</a></td>
</tr>
<tr>
<td><a href="#truncateint-length--string-substring---">truncate</a></td>
<td><a href="#underscored">underscored</a></td>
<td><a href="#uppercamelize">upperCamelize</a></td>
<td><a href="#uppercasefirst">upperCaseFirst</a></td>
</tr>
</table>
* [Extensions](#extensions)
* [Tests](#tests)
* [License](#license)
## Why?
In part due to a lack of multibyte support (including UTF-8) across many of
PHP's standard string functions. But also to offer an OO wrapper around the
`mbstring` module's multibyte-compatible functions. Stringy handles some quirks,
provides additional functionality, and hopefully makes strings a little easier
to work with!
```php
// Standard library
strtoupper('fòôbàř'); // 'FòôBàř'
strlen('fòôbàř'); // 10
// mbstring
mb_strtoupper('fòôbàř'); // 'FÒÔBÀŘ'
mb_strlen('fòôbàř'); // '6'
// Stringy
s('fòôbàř')->toUpperCase(); // 'FÒÔBÀŘ'
s('fòôbàř')->length(); // '6'
```
## Installation
If you're using Composer to manage dependencies, you can include the following
in your composer.json file:
```json
"require": {
"danielstjules/stringy": "~3.1.0"
}
```
Then, after running `composer update` or `php composer.phar update`, you can
load the class using Composer's autoloading:
```php
require 'vendor/autoload.php';
```
Otherwise, you can
没有合适的资源?快使用搜索试试~ 我知道了~
多功能PHP图床源码:Lsky Pro开源版 最新兰空图床
共2000个文件
php:1184个
md:311个
json:206个
1 下载量 164 浏览量
2023-11-07
09:30:46
上传
评论
收藏 21.23MB ZIP 举报
温馨提示
Lsky Pro是一款功能丰富的在线图片上传和管理工具,即兰空图床。它不仅可以作为个人云相册,还可以用作写作贴图库。 该程序的初始版本于2017年10月由ThinkPHP 5开发,经过多个版本的迭代,于2022年3月发布了全新的2.0版本。 Lsky Pro支持本地和多种第三方云储存(如AWS S3、阿里云OSS、腾讯云COS、七牛云、又拍云、SFTP、FTP、WebDav和Minio)。 此外,该程序支持多种数据库驱动,如MySQL 5.7+、PostgreSQL 9.6+、SQLite 3.8.8+和SQL Server 2017+,并支持Memcached、Redis、DynamoDB等多种缓存驱动。Lsky Pro具有多图上传、拖拽上传、粘贴上传、动态设置策略上传、复制、一键复制链接等功能。 该程序还具有强大的图片管理功能,支持瀑布流展示、鼠标右键、单选多选、重命名等操作。你可以自由度极高地配置角色组,为每个组配置多个储存策略,并将储存策略配置给多个角色组。此外,Lsky Pro还支持图片水印、文字水印、水印平铺、设置水印位置、X/y轴偏移量、旋转角度等。你还可以通过接口上传、
资源推荐
资源详情
资源评论
收起资源包目录
多功能PHP图床源码:Lsky Pro开源版 最新兰空图床 (2000个子文件)
signing.c 13KB
crt.c 10KB
credentials.c 5KB
stream.c 5KB
logging.c 2KB
event_loop.c 1KB
http.c 970B
crc.c 872B
php_util.c 628B
awscrt.c 440B
style.css 160KB
bootstrap.min.css 158KB
fontawesome.css 58KB
font-awesome.min.css 40KB
ignition.css 40KB
app.css 35KB
laravel-debugbar.css 30KB
github-markdown.css 20KB
github-markdown-light.css 14KB
exception.css 14KB
open-iconic.css 14KB
laravel-debugbar-dark-mode.css 13KB
whoops.base.css 10KB
debugbar.css 10KB
nv.d3.min.css 9KB
common.css 8KB
viewer.min.css 8KB
widgets.css 7KB
openhandler.css 7KB
default.css 5KB
widget.css 4KB
prism.css 4KB
context-js.css 3KB
sabredav.css 3KB
htmlDescriptor.css 3KB
exception_full.css 3KB
github.css 3KB
widget.css 2KB
justifiedGallery.min.css 2KB
style.css 2KB
gallery.css 663B
widget.css 350B
error.css 275B
app.css 95B
octicons.css 88B
app.css 59B
laravel-debugbar-dark-mode-media-start.css 37B
laravel-debugbar-dark-mode-media-end.css 1B
custom.css 0B
.php_cs.dist 11KB
dashboard_branch.html.dist 7KB
dashboard.html.dist 7KB
file_branch.html.dist 2KB
file.html.dist 2KB
directory_branch.html.dist 2KB
directory.html.dist 2KB
file_item_branch.html.dist 1KB
directory_item_branch.html.dist 1KB
method_item_branch.html.dist 1KB
file_item.html.dist 884B
directory_item.html.dist 833B
method_item.html.dist 685B
branches.html.dist 500B
paths.html.dist 498B
coverage_bar.html.dist 295B
coverage_bar_branch.html.dist 295B
line.html.dist 197B
lines.html.dist 101B
.editorconfig 258B
.editorconfig 199B
webfa-solid-900.eot 198KB
webfa-brands-400.eot 131KB
.env.example 624B
.gitattributes 152B
.gitattributes 121B
.gitignore 119B
.gitignore 76B
.gitignore 33B
.gitignore 21B
.gitignore 21B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 10B
.gitkeep 0B
awscrt_arginfo.h 19KB
php_aws_crt.h 7KB
.htaccess 603B
404.html 4KB
favicon.ico 66KB
echarts.min.js 989KB
ignition.js 726KB
app.js 288KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
行动之上
- 粉丝: 2273
- 资源: 927
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功