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.
Informations about the package string
String Helpers
Is a simple library that provides common string functions not natively provided by PHP.
Installation
-
You can install via composer.
-
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.
- 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.