mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 21:42:13 +00:00
15 lines
252 B
C++
15 lines
252 B
C++
|
#include "stringops.h"
|
||
|
|
||
|
/// Returns true if str1 begins with substring str2
|
||
|
bool begins(const char* str1, const char* str2)
|
||
|
{
|
||
|
while(*str2)
|
||
|
{
|
||
|
if(*str1 == 0 || *str1 != *str2) return false;
|
||
|
|
||
|
str1++;
|
||
|
str2++;
|
||
|
}
|
||
|
return true;
|
||
|
}
|