isprefixof package:base-compat-batteries

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