Esc
API Index — Namespaces, Packages, Reports, Indices
StringUtils
in package
Table of Contents
Methods
- get_string_between() : string
- Return the substring between two string delimiters.
- str_contains() : bool
- str_ends_with() : bool
- str_starts_with() : bool
Methods
get_string_between()
Return the substring between two string delimiters.
public
static get_string_between(string $string, string $start, string $end) : string
Parameters
- $string : string
- $start : string
-
Opening delimiter
- $end : string
-
Closing delimiter
Return values
string —The sliced string, or '' if $start was not found.
str_contains()
public
static str_contains(string $haystack, string $needle) : bool
Parameters
- $haystack : string
- $needle : string
Return values
boolstr_ends_with()
public
static str_ends_with(string $haystack, string $needle) : bool
Parameters
- $haystack : string
- $needle : string
Return values
boolstr_starts_with()
public
static str_starts_with(string $haystack, string $needle) : bool
Parameters
- $haystack : string
- $needle : string