FINAL
Various PHP string related utility functions.
Methods
endsWith
STATIC
endsWith(string  $input, string  $suffix) : boolean
    
Return true if the first paramater contains the second parameter at the end.
Parameters
| Name | Description | 
|---|---|
| 
 | 
 The input string which may contain the suffix. | 
| 
 | 
 The string to look for at the end of the input. | 
Returns
boolean
              true iff the input contains the suffix at the
end.
startsWith
STATIC
startsWith(string  $input, string  $prefix) : boolean
    
Return true if the input string starts with the prefix string.
Parameters
| Name | Description | 
|---|---|
| 
 | 
 The string which may contain the prefix at the start. | 
| 
 | 
 The string to look for at the start of the input. | 
Returns
boolean
              true iff the input contains the prefix at the
start.
base64UrlEncode
STATIC
base64UrlEncode(string  $input) : string
    
Base64 encode a string, ensuring that the output is safe to use in a URL.
Parameters
| Name | Description | 
|---|---|
| 
 | 
 The string which may not be url safe. | 
Returns
string
              A Base64 encoded url safe string.
base64UrlDecode
STATIC
base64UrlDecode(string  $input) : string
    
Base64 decode a string that was encoded with base64UrlEncode.
Parameters
| Name | Description | 
|---|---|
| 
 | 
 The url safe Base64 encoded string. | 
Returns
string
              The original string which may not be url safe.