Alpha ZealPHP is early-stage and under active development. APIs may change between minor versions until v1.0. Feedback and bug reports welcome on GitHub.
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
bool

str_ends_with()

public static str_ends_with(string $haystack, string $needle) : bool
Parameters
$haystack : string
$needle : string
Return values
bool

str_starts_with()

public static str_starts_with(string $haystack, string $needle) : bool
Parameters
$haystack : string
$needle : string
Return values
bool
On this page