MCPcopy Create free account
hub / github.com/bloomberg/pystack / containsOnlyASCII

Function containsOnlyASCII

src/pystack/_pystack/pytypes.cpp:69–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static inline bool
70containsOnlyASCII(const std::string& val)
71{
72 return std::all_of(val.cbegin(), val.cend(), [](auto& c) {
73 return static_cast<unsigned char>(c) < 127;
74 });
75}
76
77static inline std::string
78normalizeBytesObjectRepresentation(const std::string& val, const std::string& prefix = "b")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected