MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / GetPrefixUntilComma

Function GetPrefixUntilComma

tests/gtest/gtest.h:7075–7078  ·  view source on GitHub ↗

Returns the prefix of 'str' before the first comma in it; returns the entire string if it contains no comma.

Source from the content-addressed store, hash-verified

7073// Returns the prefix of 'str' before the first comma in it; returns
7074// the entire string if it contains no comma.
7075inline std::string GetPrefixUntilComma(const char* str) {
7076 const char* comma = strchr(str, ',');
7077 return comma == nullptr ? str : std::string(str, comma);
7078}
7079
7080// Splits a given string on a given delimiter, populating a given
7081// vector with the fields.

Callers 3

RegisterMethod · 0.85
RegisterMethod · 0.85
SplitIntoTestNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected