MCPcopy Create free account
hub / github.com/Kitware/CMake / cmHasPrefix

Function cmHasPrefix

Source/cmStringAlgorithms.h:303–306  ·  view source on GitHub ↗

Returns true if string @a str starts with the character @a prefix. */

Source from the content-addressed store, hash-verified

301
302/** Returns true if string @a str starts with the character @a prefix. */
303inline bool cmHasPrefix(cm::string_view str, char prefix)
304{
305 return !str.empty() && (str.front() == prefix);
306}
307
308/** Returns true if string @a str starts with string @a prefix. */
309inline bool cmHasPrefix(cm::string_view str, cm::string_view prefix)

Callers 15

testStringAlgorithmsFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85
looksLikeSpecialVariableFunction · 0.85
GetAppleSDKTypeMethod · 0.85
VerifyLinkItemColonsMethod · 0.85
cmLinkItemValidForDeviceFunction · 0.85
cmComputeLinkDependsMethod · 0.85
AddLinkEntryMethod · 0.85
AddLinkEntriesMethod · 0.85

Calls 4

emptyMethod · 0.45
frontMethod · 0.45
compareMethod · 0.45
sizeMethod · 0.45

Tested by 3

testStringAlgorithmsFunction · 0.68
RunMethod · 0.68
MatchesFilterPrefixMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…