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 5004 to 5012

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 20th January 2021 19:05 Europe/London time based on the source file dated 19th January 2021 16:15 Europe/London time.