Strings
extends Base
in package
Class Strings
A class to handle string manipulation
Table of Contents
Properties
- $author : mixed
- $debug_log : mixed
- $debugger : mixed
- $name : mixed
- $url : mixed
- $vars : mixed
- $verbose : mixed
- $version : mixed
Methods
- __construct() : mixed
- appendGetParamsToUrl() : string
- appendGetParamsToUrl
- cap() : string
- cap
- hide() : void
- hide
- slugify() : void
- slugify
Properties
$author
public
mixed
$author
= "Darknetzz"
$debug_log
public
mixed
$debug_log
= []
$debugger
public
mixed
$debugger
$name
public
mixed
$name
= "PHPUtils"
$url
public
mixed
$url
= "https://github.com/Darknetzz"
$vars
public
mixed
$vars
$verbose
public
mixed
$verbose
= \true
$version
public
mixed
$version
= "1.0.0"
Methods
__construct()
public
__construct() : mixed
appendGetParamsToUrl()
appendGetParamsToUrl
public
appendGetParamsToUrl(string $url[, array<string|int, mixed> $params = [] ]) : string
Append GET parameters to a URL (written by Co-Pilot)
Parameters
- $url : string
-
The URL to append the parameters to
- $params : array<string|int, mixed> = []
-
The parameters to append
Return values
string —The new URL
cap()
cap
public
cap(string $string[, int $maxlen = 30 ]) : string
Cap a string to a certain length
Parameters
- $string : string
-
The string to cap
- $maxlen : int = 30
-
The maximum length of the string. Default is 30.
Return values
string —The capped string
hide()
hide
public
hide(string $string[, int $visibility = 3 ]) : void
Parameters
- $string : string
-
The string to hide.
- $visibility : int = 3
slugify()
slugify
public
slugify(string $string[, string $replace = '_' ][, int $lenCap = 0 ]) : void
Parameters
- $string : string
-
The string to slugify.
- $replace : string = '_'
-
The character to replace spaces with. Default is '_'.
- $lenCap : int = 0
-
The maximum length of the slug. Default is 0.