Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/util/util_string.cpp')
-rw-r--r--intern/cycles/util/util_string.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp
index afcca7e0411..4dfebf14923 100644
--- a/intern/cycles/util/util_string.cpp
+++ b/intern/cycles/util/util_string.cpp
@@ -117,14 +117,14 @@ bool string_startswith(const string &s, const char *start)
return strncmp(s.c_str(), start, len) == 0;
}
-bool string_endswith(const string &s, const char *end)
+bool string_endswith(const string &s, const string &end)
{
- size_t len = strlen(end);
+ size_t len = end.length();
if (len > s.size())
return 0;
else
- return strncmp(s.c_str() + s.size() - len, end, len) == 0;
+ return s.compare(s.length() - len, len, end) == 0;
}
string string_strip(const string &s)