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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package strings

Strings Component

Version License Total downloads Quality Score


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


All versions of strings with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flextype-components/strings contains the following files

Loading the files please wait ....