You appear to be a bot. Output may be restricted
Description
Performs the reverse of ltrim(), up to a pointPrepends the specified $char if it's not already there
Usage
$string = unltrim( $path, $char );
Parameters
- $path
- ( string ) required – the string to be checked
- $char
- ( char ) optional default: / – the character to prepend if not already present
Returns
string the string with the character prepended if requiredSource
File name: oik/shortcodes/oik-link.phpLines:
1 to 6 of 6
function unltrim( $path, $char='/' ) { if ( $path[0] != $char ) { $path = $char . $path; } return( $path ); }View on GitHub View on Trac