Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

strip_prefix_chars()

Description

Remove all instances of the specified character from start of string

Parameters

ColumnTypeDefaultDescription
$string string String to update
$char string Character to remove

Return

string

Location

include/collections_functions.php lines 6179 to 6187

Definition

 
function strip_prefix_chars($string,$char)
    {
    while(
strpos($string,$char)===0)
        {
        
$regmatch preg_quote($char);
        
$string preg_replace("/" $regmatch '/','',$string,1);
        }
    return 
$string;
    }

This article was last updated 19th March 2024 08:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.