diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-28 04:38:23 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-28 05:11:42 +0400 |
commit | 89cfeefab5149eb5e815740e222949c99b5525b3 (patch) | |
tree | 5943b307a5e47a32b19bb19e9692a46f1ecc0334 /intern/cycles/util/util_string.cpp | |
parent | 44d1c92e60f85fd0d757b9fc503ae32284540814 (diff) |
Cycles: experimental OSL ptex reading code.
This code can't actually be enabled for building and is incomplete, but it's
here because we know we want to support this at some point and there's not much
reason to have it in a separate branch if a simple #ifdef can disable it.
Diffstat (limited to 'intern/cycles/util/util_string.cpp')
-rw-r--r-- | intern/cycles/util/util_string.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/util/util_string.cpp b/intern/cycles/util/util_string.cpp index 53603c54da0..c4a81fc7190 100644 --- a/intern/cycles/util/util_string.cpp +++ b/intern/cycles/util/util_string.cpp @@ -86,5 +86,15 @@ void string_split(vector<string>& tokens, const string& str, const string& separ tokens.push_back(token); } +bool string_endswith(const string& s, const char *end) +{ + size_t len = strlen(end); + + if(len > s.size()) + return 0; + else + return strncmp(s.c_str() + s.size() - len, end, len) == 0; +} + CCL_NAMESPACE_END |