MCPcopy Create free account
hub / github.com/blender/blender / string_endswith

Function string_endswith

intern/cycles/util/string.cpp:120–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool string_endswith(const string_view s, const string_view end)
121{
122 const size_t len = end.size();
123 if (len > s.size()) {
124 return false;
125 }
126
127 const size_t offset = s.size() - len;
128 for (size_t i = 0; i < len; i++) {
129 if (s[offset + i] != end[i]) {
130 return false;
131 }
132 }
133
134 return true;
135}
136
137string string_strip(const string &s)
138{

Callers 8

attributesMethod · 0.85
TESTFunction · 0.85
parse_channelsFunction · 0.85
scene_initFunction · 0.85
node_find_input_by_nameFunction · 0.85
node_find_output_by_nameFunction · 0.85
set_device_override_funcFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68