added c++ isPrefixOf