src/MarkdownIt/Common/Utils.php
public function arrayReplaceAt($src, $pos, $newElements)
    {
        if(empty($newElements))$newElements=[];
        return array_merge(array_slice($src, 0, $pos), $newElements, array_slice($src, $pos + 1));
    }
public function arrayReplaceAt($src, $pos, $newElements)
    {
        if(empty($newElements))$newElements=[];
        return array_merge(array_slice($src, 0, $pos), $newElements, array_slice($src, $pos + 1));
    }
public function arrayReplaceAt ( $ src , $ pos , $ newElements ) { if ( empty ( $ newElements ) ) $ newElements = [ ] ; return array_merge ( array_slice ( $ src , 0 , $ pos ) , $ newElements , array_slice ( $ src , $ pos + 1 ) ) ; }
Remove element from array and put another array at those position.
Useful for some operations with tokens
@param array  $src
@param integer $pos
@param array  $newElements
@return array
Remove element from array and put another array at those position . Useful for some operations with tokens