Collections functions
General functions
Render functions
Theme permission 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 6055 to 6063

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 30th September 2022 16:35 Europe/London time based on the source file dated 22nd September 2022 11:00 Europe/London time.