Add a string 'StartsWith' helper function
This commit is contained in:
parent
48702616ec
commit
114dae9114
2 changed files with 15 additions and 10 deletions
|
|
@ -159,6 +159,11 @@ template<class T> inline T* NewPoolObject(T, int instances)
|
|||
return new(GetThreadPoolAllocator().allocate(instances * sizeof(T))) T[instances];
|
||||
}
|
||||
|
||||
inline bool StartsWith(TString const &str, const char *prefix)
|
||||
{
|
||||
return str.compare(0, strlen(prefix), prefix) == 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Pool allocator versions of vectors, lists, and maps
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue