You appear to be a bot. Output may be restricted
Description
Replace the instance of $source at $pos with $replace
Usage
$string = replace_at( $pos, $source, $replace, $line );
Parameters
- $pos
- ( integer ) required – the position of the first character of source, starting from 0
- $source
- ( string ) required – the string to be replaced e.g. " *"
- $replace
- ( mixed ) required –
- $line
- ( string ) required – the original line
Returns
string the new lineSource
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 6 of 6
function replace_at( $pos, $source, $replace, $line ) { $left = substr( $line, 0, $pos ); $right = substr( $line, $pos + strlen( $source ) ); $line = $left . $replace . $right; return( $line ); }View on GitHub