phpGearBox - gears/string
An object oriented way to work with strings in PHP, with multibyte support baked in.
Overview
README
The String Builder
Methods
toString
toArray
toLowerCase
toUpperCase
toSingular
toPlural
toAscii
toBoolean
toSpaces
toTabs
toDashed
toUnderScored
toCamelCase
toSnakeCase
toTitleCase
toSentenceCase
toSlugCase
is
isLowerCase
isUpperCase
isAlpha
isAlphanumeric
isBlank
isHexadecimal
isJson
isSerialized
isBase64
pad
padLeft
padRight
padBoth
applyPadding
hasLowerCase
hasUpperCase
normaliseLineEndings
delimit
insert
lines
repeat
reverse
shuffle
slice
surround
tidy
countSubstr
format
htmlDecode
htmlEncode
htmlXssClean
htmlStripTags
setRegexDelimiter
regexMatch
regexExtract
regexReplace
split
trim
trimLeft
trimRight
getTrimChars
removeLeft
removeRight
removeWhitespace
ensureLeft
ensureRight
between
betweenAll
indexOf
indexOfLast
replace
replaceBeginning
replaceEnding
truncate
safeTruncate
contains
containsAll
containsAny
first
last
startsWith
endsWith
longestCommonPrefix
longestCommonSuffix
longestCommonSubstring
lowerCaseFirst
upperCaseFirst
swapCase
lines
Splits on newlines and carriage returns.
Description
static[] lines()
Return Value
static[]