Moved matchstr to global util