Download the PHP package commandstring/utils without Composer
On this page you can find all versions of the php package commandstring/utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download commandstring/utils
More information about commandstring/utils
Files in commandstring/utils
Package utils
Short Description A collection of useful PHP utilities
License MIT
Informations about the package utils
CommandString/Utils
Basic utility functions for PHP
ArrayUtils
Converts array to an stdClass
randomizes the given array
StringUtils
Gets text between to specified points in a string and returns it.
If you want the start and end to be returned you can set the fourth argument to true, a good use case for this would be parsing a json string out of a blob of text
GeneratorUtils
Generates a UUID.
Generically the method will return a 16 character alphanumeric string
You can adjust the length as needed
You can also supply characters for the generator to use
FileSystemUtils
Get all files in a directory, if the second parameter is true then files in subdirectories will be included in the returned array
Get all subdirectories in a directory and if recursive is true all subdirectories of the subdirectories will be included
Get all files in a directory with one of the supplied extensions. If the third parameter is true then the directories' subdirectories will be searched as well.
ColorUtils
Converts a RGBA color code to a HEX color code
Converts a HEX color code to a RGBA color code.
FileSizeUtils
Convert a file size from one type to another
Creates reduces the format that appends to type abbreviation to the end.
Reduces a file size to the smallest it can be before being smaller than 1. An stdClass with a type property is then returned alongside a size property for the new size.