isprefixof package:Stream

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