Does the given name or Page have a number suffix? Returns the number if yes, or false if not
Usage
// basic usage
$int = $pagesNames->hasNumberSuffix($name);
// usage with all arguments
$int = $pagesNames->hasNumberSuffix($name, bool $getNamePrefix = false);
Arguments
Name | Type(s) | Description |
---|---|---|
name | string, Page | |
getNamePrefix (optional) | bool | Return the name prefix rather than the number suffix? (default=false) |
Return value
int
bool
string
Returns false if no number suffix, or int for number suffix or string for name prefix (if requested)
PagesNames methods and properties
API reference based on ProcessWire core version 3.0.236