Added helper function to check whether a string is prefixed with another one or not