WireTextTools::strstr()

Find the first occurrence of a string

Usage

// basic usage
$false = $wireTextTools->strstr(string $haystack, string $needle);

// usage with all arguments
$false = $wireTextTools->strstr(string $haystack, string $needle, bool $beforeNeedle = false);

Arguments

NameType(s)Description
$haystackstring
$needlestring
$beforeNeedle (optional)bool

Return part of haystack before first occurrence of the needle? Default:false

Return value

false string


WireTextTools methods and properties

API reference based on ProcessWire core version 3.0.251