Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 5268 to 5276

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 21st April 2021 17:35 Europe/London time based on the source file dated 19th April 2021 16:50 Europe/London time.