![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
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于企业微信的私域流量裂变引流工具和数据化精细运营服务SCRM系统,帮助企业快速实现智慧、简单、友好、精细的客户运营管理。可广泛应用于教育、培训、餐饮、文娱、零售、医美、电商、旅游、自媒体、网红、房地产、金融等各类行业
资源推荐
资源详情
资源评论
收起资源包目录
基于企业微信的私域流量裂变引流工具和数据化精细运营服务SCRM系统 (1637个子文件)
ReaderWriter.cd 6KB
Architecture.cd 2KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
PHPExcel_Writer_Serialized.cs 2KB
PHPExcel_Reader_Excel5.cs 1KB
PHPExcel_Reader_Serialized.cs 972B
PHPExcel_IOFactory.cs 853B
PHPExcel.cs 822B
PHPExcel_Writer_Excel2007.cs 537B
PHPExcel_Reader_Excel2007.cs 536B
IWriter.cs 231B
IReader.cs 230B
Worksheet.cs 181B
ClassDiagrams.csproj 3KB
chunk-vendors.ac158522.css 279KB
chunk-vendors.c470e980.css 204KB
chunk-10dc4824.6cf54efd.css 59KB
app.56d4fe1d.css 23KB
chunk-be2f3400.75b1cd4a.css 14KB
chunk-766c2ce0.8ea1ace0.css 14KB
chat.d17c6cca.css 13KB
chunk-cbdd8f86.8ee97d16.css 12KB
chunk-1ae45f2a.b5d8e05a.css 10KB
chunk-9112f7a0.b7f22624.css 9KB
chunk-4c62b84d.dc5838cb.css 8KB
chunk-7794939f.9cffa34b.css 7KB
chunk-145fe27d.8d709d55.css 6KB
chunk-37ecd4fd.03764c6c.css 5KB
chunk-5811157a.bfacd3e2.css 5KB
chunk-6cdf4872.fc311735.css 5KB
chunk-6441c8b3.63cd81e4.css 4KB
chunk-78d7da8d.0f6c8ba6.css 4KB
chunk-a77ef730.818dc129.css 4KB
chunk-1c64cf52.3299755d.css 3KB
chunk-53e325e0.849b1e00.css 3KB
htmlDescriptor.css 3KB
chunk-35f73ef8.505255c8.css 3KB
chunk-1f2dc704.d2c2f7d2.css 3KB
chunk-13ffae68.813b26c9.css 3KB
chunk-01a3bc8f.883454eb.css 2KB
chunk-a674212a.701d2fc5.css 2KB
chunk-5c74a990.ef5945ee.css 2KB
chunk-98254c6a.1b6c1023.css 2KB
chunk-89877136.112b865e.css 2KB
chunk-67107c90.4934194f.css 1KB
chunk-5fc85b20.11c01273.css 1KB
chunk-0c0d423a.d7ec8c88.css 589B
chunk-916e5f08.9bd0e749.css 117B
example2.csv 8KB
example1.csv 268B
.php_cs.dist 2KB
phpunit.xml.dist 826B
PHPExcel developer documentation.doc 865KB
PHPExcel AutoFilter Reference developer documentation.doc 622KB
PHPExcel Function Reference developer documentation.doc 614KB
PHPExcel User Documentation - Reading Spreadsheet Files.doc 170KB
.editorconfig 271B
.editorconfig 131B
hiddeninput.exe 9KB
functions 53KB
functions 36KB
functions 36KB
functions 35KB
functions 35KB
functions 35KB
functions 34KB
functions 33KB
functions 32KB
functions 32KB
functions 32KB
functions 32KB
functions 31KB
functions 31KB
functions 31KB
functions 29KB
phpexcel_logo.gif 6KB
.gitattributes 70B
.gitattributes 70B
.gitignore 154B
.gitignore 108B
.gitignore 71B
.gitignore 42B
.gitignore 37B
共 1637 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
- 乄Dream微笑Jason2024-09-15这个资源总结的也太全面了吧,内容详实,对我帮助很大。
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7454
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 敏源的MCP62 电容CPU的DATASHEET
- 10 分钟,不到 100 行代码,使用 Langchain 实现一个领域助手
- 基于Springboot网上花店销售管理系统-项目源码-拿来即可用
- 汽车公司潜在客户数据集.zip
- 基于Matlab实现质点三自由度仿真程序(源码).rar
- UaExpert + KEPServerEX 6 + Open62541编译之后的文件 + WS2-32库
- 龙门式双通道点胶机sw16可编辑全套技术资料100%好用.zip
- 信用卡申请用户数据集.zip
- 轮毂压铸放网机sw2020可编辑全套技术资料100%好用.zip
- 六足球型机器人(sw15可编辑+工程图+源码全套)全套技术资料100%好用.zip
- VBS加密解密 绿色多个程序
- 敏源CPU 电容探测 电极设计的文档
- C语言实现多样圣诞树图形代码
- C语言实现多种效果的圣诞树代码示例
- C语言实现多样化圣诞树绘图
- AB测试模拟用户数据集.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功