Export substring filter function for backwards compatibility.