Changeset bc3127d for src/Common
- Timestamp:
- Sep 1, 2017, 4:26:14 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5809461, ba2a68b
- Parents:
- 78a0b88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r78a0b88 rbc3127d 222 222 std::cerr << "Warning: "; 223 223 warn_single( params... ); 224 } 225 226 /// determines if `pref` is a prefix of `str` 227 static inline bool isPrefix( const std::string & str, const std::string & pref ) { 228 if ( pref.size() > str.size() ) return false; 229 auto its = std::mismatch( pref.begin(), pref.end(), str.begin() ); 230 return its.first == pref.end(); 224 231 } 225 232
Note: See TracChangeset
for help on using the changeset viewer.