MCPcopy Create free account
hub / github.com/PDAL/PDAL / endsWith

Function endsWith

pdal/util/Utils.hpp:233–241  ·  view source on GitHub ↗

Determine if a string ends with a particular postfix. \param s String to check for postfix. \param postfix Postfix to search for. \return Whether the string ends with the postfix. */

Source from the content-addressed store, hash-verified

231 \return Whether the string ends with the postfix.
232 */
233 inline bool endsWith(const std::string& s, const std::string& postfix)
234 {
235 if (postfix.empty())
236 return true;
237 if (postfix.size() > s.size())
238 return false;
239 return (strcmp(postfix.data(),
240 s.data() + s.size() - postfix.size()) == 0);
241 }
242
243 /**
244 Generate a checksum that is the integer sum of the values of the bytes

Callers 8

EptInfoMethod · 0.85
storeMethod · 0.85
loadMethod · 0.85
TESTFunction · 0.85
Segmentation.cppFile · 0.85
inferReaderDriverMethod · 0.85
inferWriterDriverMethod · 0.85
remoteGlobFunction · 0.85

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.68