Fix #915, string ends with

pull/978/head
winlin 8 years ago
parent 93710c7489
commit 372a9e5cb3

@ -317,7 +317,8 @@ string srs_string_remove(string str, string remove_chars)
bool srs_string_ends_with(string str, string flag)
{
return str.rfind(flag) == str.length() - flag.length();
ssize_t pos = str.rfind(flag);
return (pos != string::npos) && (pos == str.length() - flag.length());
}
bool srs_string_ends_with(string str, string flag0, string flag1)

Loading…
Cancel
Save