Download the PHP package jameslevi/string without Composer

On this page you can find all versions of the php package jameslevi/string. 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 string

String Helpers

Is a simple library that provides common string functions not natively provided by PHP.

Installation

  1. You can install via composer.

  2. If you are not using any PHP framework, just paste this code at the upper part of your code to include composer autoload mechanism in your project.

  3. You can now use all functions included from this library.

str_equals(string $string, mixed $match)

Make comparison between two strings.

str_starts_with(string $string, mixed $match)

Determine if string starts with the match string.

str_ends_with(string $string, mixed $match)

Determine if string ends with the match string.

str_remove(string $string, mixed $search)

Remove all matched character from the string.

str_move(string $string, int $start, int $end = 0)

Remove one or more characters from one or both side of the string.

str_move_left(string $string, int $count)

Remove one or more characters from the left side of the string.

str_move_right(string $string, int $count)

Remove one or more characters from the right side of the string.

str_count_numeric(string $string)

Count the number of occurences of numeric characters in string.

str_count_uppercase_letter(string $string)

Count the number of occurences of uppercase letters in string.

str_count_lowercase_letter(string $string)

Count the number of occurences of lowercase letters in string.

str_count_letter(string $string)

Count the number of occurences of letters in string.

str_count_line(string $string)

Count the number of lines in string.

str_count_spaces(string $string)

Count the number of spaces in string.

str_count_special_chars(string $string)

Count the number of special characters in string.

str_count_words(string $string)

Count the number of words in a string.

str_words(string $string)

Return list of words from the string.

This function will return

str_contains(string $string, mixed $keywords)

Test if string contains one or more word or characters.

str_break(string $string, string $delimeter)

Break a string into just two segments.

This function will return

str_is_upper(string $string)

Determine if string is in uppercase.

str_is_lower(string $string)

Determine if string is in lowercase.

str_uppercase(string $string, int $position)

Make a letter uppercase by position number.

str_lowercase(string $string, int $position)

Make a letter lowercase by position number.

str_to_camel(string $string)

Convert group of words into camel case.

str_to_snake(string $string)

Convert group of words into snake case.

str_to_kebab(string $string)

Convert group of words into kebab case.

str_to_pascal(string $string)

Convert group of words into pascal case.

str_camel_to_snake(string $string)

Convert string from camel case to snake case.

str_camel_to_kebab(string $string)

Convert string from camel case to kebab case.

str_camel_to_pascal(string $string)

Convert string from camel case to pascal case.

str_snake_to_camel(string $string)

Convert string from snake case to camel case.

str_snake_to_kebab(string $string)

Convert string from snake case to kebab case.

str_snake_to_pascal(string $string)

Convert string from snake case to pascal case.

str_kebab_to_camel(string $string)

Convert string from kebab case to camel case.

str_kebab_to_snake(string $string)

Convert string from kebab case to snake case.

str_kebab_to_pascal(string $string)

Convert kebab case string to pascal case.

str_pascal_to_camel(string $string)

Convert string from pascal case string to camel case.

str_pascal_to_snake(string $string)

Convert string from pascal case to snake case.

str_pascal_to_kebab(string $string)

Convert string from pascal case to kebab case.

str_camel_to_words(string $string)

Convert camel case string to words.

str_snake_to_words(string $string)

Convert snake case string to words.

str_kebab_to_words(string $string)

Convert kebab case string to words.

str_pascal_to_words(string $string)

Convert pascal case string to words.

str_truncate(string $string, int $max)

Truncate string if exceeded the maximum charachters and automatically append "..." at the end of the string.

str_random(int $length = 10, int $pool = 0)

Generate a random string.

Contribution

For issues, concerns and suggestions, you can email James Crisostomo via [email protected].

License

This package is an open-sourced software licensed under MIT License.


All versions of string with dependencies

PHP Build Version
Package Version
Requires php Version >=5.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 jameslevi/string contains the following files

Loading the files please wait ....