![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. 基于thinkphp6 + vue2 + ElementUI 最新框架 2. 前后端分离, 分工明确 3. 模块化编程, 减少耦合 4. 首创数据库编程, 数据定义了模块名称, 控制器名称, 模型名称, 验证器名称 5. 框架自带Crud代码生成功能 6. 完全自主代码授权, 可用于一切商业活动
资源详情
资源评论
资源推荐
收起资源包目录
基于thinkphp6, vue2, element-ui. 一款简单的客户管理, 案例展示系统后端 (2000个子文件)
0001c3ceeb291cabd6f9aefd5b31d5ebaf2709 505B
0011056700ec59488750d41a7daa59cf29a603 811B
001bf09913af96ad2be113243a393d2aa47d9c 322B
001f7d623809ef59b85d37d031151f677e66d5 152B
00218b37eae57c37196df91146375f0f2681f7 587B
002836891fb05e01a898bf3120aab358cf7720 648B
00370a89f9c50de291b46336dacec815be6cba 212B
0041d6ebf057a2bae61671a731fc9a9ed10ed5 685B
0056139ae4e9bdf8ace850401110e5ab133c47 127B
005f6d2b576b1e850a6c1630ea9d4806346563 565B
00697ecd741b12941aa4be0e6ab3e9af45e828 560B
0073f9bc6e3c6f04f70661ba4225e85abd2732 115B
00758db818ac43e80b9318406eda2a793c518d 210B
0087cc081c21764dcbd2f40938783ebb182f75 925B
0095544fe46817291a16b1e3bdd0dacd632d2a 632B
00a0cdec72adf3a3a1a8eb85ddd73dec6c3079 153B
00a1852019cf293c5dbb668327cba629ff505b 553B
00a1ee2a120af3240f19f89c996623018fd2e9 192B
00abfe1e64dc14f49d55102c4a9207d9a81ed7 322B
00af9464ba967fcb50e8a97098a139fe543144 363B
00e054951a73cf540fb9f7f6f03475a4ba67e7 130B
00e0c5e32987cc4394051ab417eb07044553b8 861B
00e2efd3631489a3171ac443a40f946a0a32cd 459B
00f858e4d5fa57e3b6494f616103c31dfce5bf 585B
0108bc24a6628bb186f28900af45cf2936a57c 1KB
010de43bd2db67335a4afdc444cce8fb112d08 505B
01131ed908306b88f171a52cc19fb39cea53ef 159B
01136160b7546bbcf79a32f09c911060b0527d 504B
011629801349f86dbd6431fd979b29f0b41678 776B
013771cd46d5837a37352283b5dd14a0a17e62 183B
013a77cf7735e847ae3a17af9ba8f85ce3902f 496B
0151cd4849bdbae112e37fd1f045c599eb49c7 153B
01603070ecfeaa304c1217f86c44a6faf56a3a 407B
01621eb94f0decc283ee37c2038b75b16f9153 115B
0173d9047ff68802388bf164533881cda0d4ba 526B
01789e08cc81ef4921cb922eb8a48a6d6c695f 2KB
0180b88d1062fedd5860aa33df1233b5a4c2f0 873B
018565eaad01df510e8a453eff38fb0d29763f 156B
018e8af5032b35d8dab30fb829834e486c1896 145B
01911d178b1d1ab4426dc9a165db2dff9c422a 1KB
0199a56fa5e4a1061d99c17106dc9f9064492c 130B
019dad81bd6825c0f209c31f55a12d453d8fcc 152B
01a25b151acbfef25579bf70ddaec3f18a8f43 811B
01a77cc336e3cf3cec732e3b3b275ce153f88f 209B
01c4930a4cac429b96e3cef551a0363ea97e85 56B
01c61378be4051953d58715c7428edb70abff0 149B
01cc413f0298715bc6219665efaed4e8afa568 237B
01d809f77314ef7df016f964d8a2f3c69672df 442B
01e202af1504cf963039769853f31941257a77 754B
01e399aaf10414e9592f682825920bb5b4ef67 468B
01f6aa6b73094f9afaceed3c877c1ce4a7a65c 648B
02073bdae380587296b0c6323d64491713e1c3 154B
0208875ff618fe93e95e9e49a39254c6b4b2d3 172B
0208e749984cdcb2a75e16ef080c9b8e590e46 2KB
0210fd309cadd2ae7bd206713b418f9e5982ed 526B
021e6361e36d7bd088d107d76464015445a3cd 652B
02247d56a5ee6f2993a7b04fe322f4c0e7f138 585B
0225b129815c9cebe55b093674be79a125dc1d 755B
023960bf4dbc5c81fb4f3a9d54a1f3b930ee57 264B
02459df1cd475a18dcee1d22879d770f945be0 587B
0245cc3f506dd1071a105b0fa7c7b67914d3a1 729B
0247cdacc2d0a23ec9d37de5aa9e2212a6b1c1 163B
025077a50d58d65083ce916970b1742f6c20e7 4KB
0253b4d7625bcc3a3bf339e8a6b73fe5e543c7 526B
0263642171c19e2d329adee7a1e96e30ba62a8 1KB
026cc0937655ff2ab06a21910a32b3c9aa8e3a 4KB
02725622c0aa89e68873df9a9464ea88fa3fea 728B
0282e6ee70f830bdf341cd4eb3e323f9acd089 755B
028dcb8930f3490cd8a0690ff934cfa2105c3a 234B
029724028625caf9b7b7927a7716e4ad8bc6e2 421B
02a75350144d91228a16863dca919c43b1373b 560B
02acb50487df5ffff25f8e09fb58bcea126790 236B
02bc9247f7205bd8f5376ec72eb4dea701051d 2KB
02bf84b2ece6e0c424936a938d755b6e946ad9 768B
02c236d769b867f12366131500436fee5884e1 115B
02c9ff58e9da0d3f6ab6c818c4beeff0ed114f 99B
02cca4d8409d8e80a87689642b1ceebfe78b43 152B
02d2616a2084a9ff442095e5ca0db230594f0b 434B
02eb7e333cf7d76270b74ab5149c9ef4216b9a 115B
030091ae535205f2e6d04b8cfe740ddd738607 114B
03072d330304d72e2aa94f7c5ed26e60935528 152B
0308ad963f1c8801dced8fa4cd9a414bfe61a1 896B
030bba4e2f13b31465271d8fb350dd5165f2e8 152B
031cec2804261cc688f03221107ddcd955718e 2KB
03249b9e166f18aa36fc65ca78f271edf457d1 1KB
0325aa7ac26ad99c499203898b312fe15df796 100B
032ab674c4dd91dbc06cca8085ff66999161d7 552B
0343365a0a16e5d59d9f1191702462ace723d7 2KB
0380be0de4a124c912b04d31c3349a72e2d2d1 543B
0381422dcf42007f9350a226732fc94ed4d766 843B
038479083599ab01a2192746dce3301c7b46ed 4KB
03a04d6e148f6760177ac692b56d90f4634365 234B
03a488610829764baf91843a6fa8f868af5991 842B
03b78f4124dc06c59dd8843ec47bb17afc6322 1KB
03bbc132626fd6f5382191702f51dc81329785 593B
03c66b1465060ff4297fc08b901a6db4e4fe57 505B
03ce6cafe6005fc7cd78bc3d7e55931f0748f6 114B
03d7f032e0dc0a1d4cc97b361375e6aabbf031 1KB
03de2b742fe787e1372c003abaaddee52189ab 449B
03e98b605812387bbb5a1c01f7e13261448caf 155B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
艾思软件-app开发公司
- 粉丝: 56
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 车辆船只人员检测3-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord、VOC数据集合集.rar
- 物流数据相关标准清单.xlsx
- python语言kssppxhb爬虫程序代码xQZQ.txt
- python语言kssphb爬虫程序代码QZQ.txt
- python语言kssppxhb爬虫程序代码xQZQ1.txt
- python语言kssp爬虫程序代码ZQ.txt
- python语言kssp爬虫程序代码QZQ.txt
- python语言kssp爬虫程序代码QZQ1.txt
- python语言kuaishoushiping爬虫程序代码QZQ.txt
- Python项目开发流程及其各环节注意事项详解
- 汽车-车联网数据相关标准清单.xlsx
- 车辆船只检测4-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord、VOC数据集合集.rar
- 基于51单片机的数码管多种波形发生器设计(protues仿真)-毕业设计
- 四足机器人步态控制算法解析与代码实现
- 四足机器人步态控制算法及Python实现
- 四足机器人步态控制算法的技术原理及Python实现
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0