isprefixof package:base-compat

The isPrefixOf function returns True if the first argument is a prefix of the second.