MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / rfind

Method rfind

src/common/classes/fb_string.cpp:206–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 AbstractString::size_type AbstractString::rfind(const_pointer s, const size_type pos) const
207 {
208 const size_type l = static_cast<size_type>(strlen(s));
209 int lastpos = length() - l;
210 if (lastpos < 0) {
211 return npos;
212 }
213 if (pos < static_cast<size_type>(lastpos)) {
214 lastpos = pos;
215 }
216 const_pointer start = c_str();
217 for (const_pointer endL = &start[lastpos]; endL >= start; --endL)
218 {
219 if (memcmp(endL, s, l) == 0) {
220 return endL - start;
221 }
222 }
223 return npos;
224 }
225
226 AbstractString::size_type AbstractString::rfind(char_type c, const size_type pos) const
227 {

Callers 15

start_and_watch_serverFunction · 0.45
writeMethod · 0.45
parseExternalValueFunction · 0.45
splitConnectionStringMethod · 0.45
splitDataSourceNameFunction · 0.45
expand_filename2Function · 0.45
testFunction · 0.45
doctorModuleExtensionMethod · 0.45
splitLastComponentMethod · 0.45
concatPathMethod · 0.45
doctorModuleExtensionMethod · 0.45
splitLastComponentMethod · 0.45

Calls 1

lengthFunction · 0.50

Tested by 1

testFunction · 0.36