Download the PHP package flextype-components/strings without Composer
On this page you can find all versions of the php package flextype-components/strings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flextype-components/strings
More information about flextype-components/strings
Files in flextype-components/strings
Package strings
Short Description Strings Component is a set of methods to help with the manipulation of strings.
License MIT
Informations about the package strings
Strings Component
Installation
With Composer:
Usage
Methods
Method | Description |
---|---|
Strings::stripSpaces() |
Strip all whitespaces from the given string. |
Strings::trimSlashes() |
Removes any leading and trailing slashes from a string. |
Strings::reduceSlashes() |
Reduces multiple slashes in a string to single slashes. |
Strings::stripQuotes() |
Removes single and double quotes from a string. |
Strings::quotesToEntities() |
Convert single and double quotes to entities. |
Strings::validEncoding() |
Checks if the string is valid in UTF-8 encoding. |
Strings::fixEncoding() |
Removes all invalid UTF-8 characters from a string. |
Strings::normalizeNewLines() |
Standardize line endings to unix-like. |
Strings::normalizeSpaces() |
Normalize white-spaces to a single space. |
Strings::random() |
Creates a random string of characters. |
Strings::increment() |
Add's _1 to a string or increment the ending number to allow _2 , _3 , etc. |
Strings::wordsCount() |
Return information about words used in a string. |
Strings::length() |
Return the length of the given string. |
Strings::lower() |
Convert the given string to lower-case. |
Strings::upper() |
Convert the given string to upper-case. |
Strings::limit() |
Limit the number of characters in a string. |
Strings::studly() |
Convert a value to studly caps case. |
Strings::snake() |
Convert a string to snake case. |
Strings::camel() |
Convert a string to camel case. |
Strings::kebab() |
Convert a string to kebab case. |
Strings::words() |
Limit the number of words in a string. |
Strings::contains() |
Determine if a given string contains a given substring. |
Strings::containsAll() |
Determine if a given string contains all array values. |
Strings::containsAny() |
Determine if a given string contains any of array values. |
Strings::substr() |
Returns the portion of string specified by the start and length parameters. |
Strings::ucfirst() |
Converts the first character of a UTF-8 string to upper case and leaves the other characters unchanged. |
Strings::trim() |
Strip whitespace (or other characters) from the beginning and end of a string. |
Strings::trimRight() |
Strip whitespace (or other characters) from the end of a string. |
Strings::trimLeft() |
Strip whitespace (or other characters) from the beginning of a string. |
Strings::capitalize() |
Converts the first character of every word of string to upper case and the others to lower case. |
Strings::reverse() |
Reverses string. |
Strings::segments() |
Get array of segments from a string based on a delimiter. |
Strings::segment() |
Get a segment from a string based on a delimiter. Returns an empty string when the offset doesn't exist. Use a negative index to start counting from the last element. |
Strings::firstSegment() |
Get the first segment from a string based on a delimiter. |
Strings::lastSegment() |
Get the last segment from a string based on a delimiter. |
Strings::between() |
Get the portion of a string between two given values. |
Strings::before() |
Get the portion of a string before the first occurrence of a given value. |
Strings::beforeLast() |
Get the portion of a string before the last occurrence of a given value. |
Strings::after() |
Return the remainder of a string after the first occurrence of a given value. |
Strings::afterLast() |
Return the remainder of a string after the last occurrence of a given value. |
Strings::padBoth() |
Pad both sides of a string with another. |
Strings::padLeft() |
Pad the left side of a string with another. |
Strings::padRight() |
Pad the right side of a string with another. |
Strings::replaceArray() |
Replace a given value in the string sequentially with an array. |
Strings::replaceFirst() |
Replace the first occurrence of a given value in the string. |
Strings::replaceLast() |
Replace the last occurrence of a given value in the string. |
Strings::start() |
Begin a string with a single instance of a given value. |
Strings::startsWith() |
Determine if a given string starts with a given substring. |
Strings::endsWith() |
Determine if a given string ends with a given substring. |
Strings::finish() |
Cap a string with a single instance of a given value. |
Strings::hash() |
Generate a hash string from the input string. |
Method: Strings::stripSpaces()
Strip all whitespaces from the given string.
Method: Strings::trimSlashes()
Removes any leading and trailing slashes from a string.
Method: Strings::reduceSlashes()
Reduces multiple slashes in a string to single slashes.
Method: Strings::stripQuotes()
Removes single and double quotes from a string.
Method: Strings::quotesToEntities()
Convert single and double quotes to entities.
Method: Strings::validEncoding()
Checks if the string is valid in UTF-8 encoding.
Method: Strings::fixEncoding()
Removes all invalid UTF-8 characters from a string.
Method: Strings::normalizeNewLines()
Standardize line endings to unix-like.
Method: Strings::normalizeSpaces()
Normalize white-spaces to a single space.
Method: Strings::random()
Method: Strings::increment()
Add's _1
to a string or increment the ending number to allow _2
, _3
, etc.
Method: Strings::wordsCount()
Return information about words used in a string
Method: Strings::length()
Return the length of the given string.
Method: Strings::lower()
Convert the given string to lower-case.
Method: Strings::upper()
Convert the given string to upper-case.
Method: Strings::limit()
Limit the number of characters in a string.
Method: Strings::studly()
Convert a value to studly caps case.
Method: Strings::snake()
Convert a string to snake case.
Method: Strings::camel()
Convert a string to camel case.
Method: Strings::kebab()
Convert a string to kebab case.
Method: Strings::words()
Limit the number of words in a string.
Method: Strings::contains()
Determine if a given string contains a given substring.
Method: Strings::containsAll()
Determine if a given string contains a given array of substrings.
Method: Strings::containsAny()
Determine if a given string contains any of array values.
Method: Strings::substr()
Returns the portion of string specified by the start and length parameters.
Method: Strings::ucfirst()
Converts the first character of a string to upper case and leaves the other characters unchanged.
Method: Strings::trim()
Strip whitespace (or other characters) from the beginning and end of a string.
Method: Strings::trimRight()
Strip whitespace (or other characters) from the end of a string.
Method: Strings::trimLeft()
Strip whitespace (or other characters) from the beginning of a string.
Method: Strings::capitalize()
Converts the first character of every word of string to upper case and the others to lower case.
Method: Strings::reverse()
Reverses string.
Method: Strings::segments()
Get array of segments from a string based on a delimiter.
Method: Strings::segment()
Get a segment from a string based on a delimiter. Returns an empty string when the offset doesn't exist. Use a negative index to start counting from the last element.
Method: Strings::firstSegment()
Get the first segment from a string based on a delimiter.
Method: Strings::lastSegment()
Get the last segment from a string based on a delimiter.
Method: Strings::between()
Get the portion of a string between two given values.
Method: Strings::before()
Get the portion of a string before the first occurrence of a given value.
Method: Strings::beforeLast()
Get the portion of a string before the last occurrence of a given value.
Method: Strings::after()
Return the remainder of a string after the first occurrence of a given value.
Method: Strings::afterLast()
Return the remainder of a string after the last occurrence of a given value.
Method: Strings::padBoth()
Pad both sides of a string with another.
Method: Strings::padRight()
Pad the right side of a string with another.
Method: Strings::padLeft()
Pad the left side of a string with another.
Method: Strings::replaceArray()
Replace a given value in the string sequentially with an array.
Method: Strings::replaceFirst()
Replace the first occurrence of a given value in the string.
Method: Strings::replaceLast()
Replace the last occurrence of a given value in the string.
Method: Strings::start()
Begin a string with a single instance of a given value.
Method: Strings::startsWith()
Determine if a given string starts with a given substring.
Method: Strings::endsWith()
Determine if a given string ends with a given substring.
Method: Strings::finish()
Cap a string with a single instance of a given value.
Method: Strings::hash()
Generate a hash string from the input string.
License
The MIT License (MIT) Copyright (c) 2020 Sergey Romanenko