ZEROSPAM\Framework\SDK\Utils\Str
Class Str
Helper to work with strings
Synopsis
class Str
{
- // members
- protected static array $snakeCache = ;
- protected static array $camelCache = ;
- // methods
- private void __construct()
- public static string lower()
- public static string upper()
- public static string snake()
- public static string camel()
- public static string studly()
- public static bool startsWith()
- public static bool endsWith()
- public static bool contains()
- public static bool containsAll()
- public static string replaceFirst()
Members
protected
- $camelCache
—
array
The cache of camel-cased words. - $snakeCache
—
array
The cache of snake-cased words.
Methods
public
- camel() — Convert a value to camel case.
- contains() — Determine if a given string contains a given substring.
- containsAll() — Determine if a given string contains all given substring.
- endsWith() — Determine if a given string ends with a given substring.
- lower() — Convert the given string to lower-case.
- replaceFirst() — Replace the first occurrence of needle in the haystack.
- snake() — Convert a string to snake case.
- startsWith() — Determine if a given string starts with a given substring.
- studly() — Convert a value to studly caps case.
- upper() — Convert the given string to upper-case.
History
-
2018-07-16T14:26:38+00:00 (commit #290a97d)
Author: Antoine Aflalo (antoine.aflalo@zerospam.ca) / Commiter: Antoine Aflalo (antoine.aflalo@zerospam.ca)
feat(Response): Split Ratelimited from BaseResponse New type of response can now be easily build.