![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
没有合适的资源?快使用搜索试试~ 我知道了~
抖音霸屏源码,同城爆店码,爆客码,抖音霸屏,视频号霸屏,螃蟹霸屏源码1.6.9,芒果霸屏1.6
共2000个文件
xml:1966个
php:1116个
md:473个
5星 · 超过95%的资源 需积分: 50 71 下载量 75 浏览量
2021-04-14
16:10:29
上传
评论 5
收藏 16.35MB ZIP 举报
温馨提示
抖音霸屏源码,同城爆店码,爆客码,抖音霸屏,视频号霸屏,螃蟹霸屏源码1.6.9,芒果霸屏1.6
资源详情
资源评论
资源推荐
收起资源包目录
抖音霸屏源码,同城爆店码,爆客码,抖音霸屏,视频号霸屏,螃蟹霸屏源码1.6.9,芒果霸屏1.6 (2000个子文件)
bootstrap.min.css 149KB
bootstrap.css 143KB
mui.css 96KB
layui.css 73KB
layui.css 73KB
chunk-vendors.0d53fc90.css 60KB
weui.css 35KB
font-awesome.css 27KB
quill.snow.css 24KB
swiper.min.css 17KB
console.css 15KB
layer.css 14KB
city-select.css 12KB
bootstrap-datetimepicker.min.css 11KB
write_off.css 10KB
layui.mobile.css 10KB
activity.css 10KB
common_mobile.css 9KB
card_ter.css 8KB
laydate.css 7KB
new_activity.css 7KB
normalize.css 6KB
after_index.css 6KB
infor.css 6KB
demo.css 6KB
normalize.css 6KB
index.css 6KB
examine.css 4KB
iconfont.css 4KB
index07.css 4KB
new_card.css 4KB
receive.css 3KB
pupop.css 3KB
iconfont.css 3KB
index08.css 3KB
index02.css 3KB
dy_global.css 3KB
index06.css 2KB
login.css 2KB
douyin.css 2KB
index.css 2KB
openid_list.css 2KB
app.16b50861.css 2KB
app.658c3613.css 2KB
app.907a183c.css 2KB
app.474a2251.css 2KB
my.css 1KB
card.css 1KB
common.css 1KB
common.css 1KB
index03.css 1KB
code.css 1KB
uploadself.css 760B
px_Popup.css 718B
index04.css 486B
index05.css 469B
console.layui.css 142B
console.we7.css 101B
form.html 53KB
header.html 46KB
new_activity.html 32KB
form.html 27KB
form.html 26KB
main.html 18KB
new_coupon.html 18KB
coupon_consume.html 15KB
coupon.html 14KB
form.html 13KB
shop_info.html 13KB
form.html 13KB
shop_coupon.html 11KB
add_shop.html 10KB
main.html 10KB
draw.html 10KB
card.html 9KB
main.html 9KB
main.html 9KB
shop_edit.html 9KB
activity.html 8KB
record.html 8KB
task.html 8KB
main.html 8KB
index.html 8KB
main.html 7KB
edit.html 7KB
main.html 7KB
setting.html 7KB
form.html 7KB
main_manager.html 7KB
shop.html 6KB
main.html 6KB
activity.html 5KB
index_1.html 5KB
message.html 5KB
user.html 5KB
demo_unicode.html 4KB
demo_symbol.html 4KB
shop_common_footer.html 3KB
openid_list.html 3KB
form_manager.html 3KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
城主殿下
- 粉丝: 6
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Adams多体动力学仿真 Cruise 动力性,经济性仿真 动力系统参数匹配 纯电动汽车,混合动力汽车,双电机汽车 simuli
- 基于Java语言的SpringCloud微服务架构设计源码
- 基于Python的多种系统辨识算法设计源码
- 基于C++的北京六部工坊机器人仿真开源设计源码
- Qt实现的包含图片显示功能、自适应缩放、背景图片、画roi工具 不依赖其他库纯Qt实现 在图片上可以画矩形、矩形旋转、圆形、
- 基于Springboot+Vue前后端分离技术的课程精品网站设计源码
- 基于SpringBoot和Vue的民宿在线预定平台设计源码
- 正余弦优化(SCA)算法+任务分配的多智能体路径规划算法 matlab代码 显示方式为动态显示 新型群智能算法 多智能体
- 基于Java语言的广东海洋大学体育管理系统后端设计源码
- 基于Java实现的boardRoom会议室控制设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1