PHP字符串操作库:Stringy
jopen
10年前
Stringy是一个PHP字符串操作库,支持多字节。 提供包括OO的方法链和一个程序式风格的静态封装。测试兼容PHP 5.3+和 HHVM。灵活源于underscore.string.js。
- Requiring/Loading
- OO and Procedural
- Implemented Interfaces
- Methods
- at
- camelize
- chars
- collapseWhitespace
- contains
- containsAll
- containsAny
- countSubstr
- create
- dasherize
- endsWith
- ensureLeft
- ensureRight
- first
- getEncoding
- humanize
- insert
- isAlpha
- isAlphanumeric
- isBlank
- isHexadecimal
- isJson
- isLowerCase
- isSerialized
- isUpperCase
- last
- length
- longestCommonPrefix
- longestCommonSuffix
- longestCommonSubstring
- lowerCaseFirst
- pad
- padBoth
- padLeft
- padRight
- regexReplace
- removeLeft
- removeRight
- replace
- reverse
- safeTruncate
- shuffle
- slugify
- startsWith
- substr
- surround
- swapCase
- tidy
- titleize
- toAscii
- toLowerCase
- toSpaces
- toTabs
- toTitleCase
- toUpperCase
- trim
- truncate
- underscored
- upperCamelize
- upperCaseFirst