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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user