MCPcopy Create free account
hub / github.com/actor-framework/actor-framework / is_ascii

Function is_ascii

examples/http/rest.cpp:81–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79// -- utility functions --------------------------------------------------------
80
81bool is_ascii(caf::span<const std::byte> buffer) {
82 auto pred = [](auto x) { return isascii(static_cast<unsigned char>(x)); };
83 return std::all_of(buffer.begin(), buffer.end(), pred);
84}
85
86std::string to_ascii(caf::span<const std::byte> buffer) {
87 return std::string{reinterpret_cast<const char*>(buffer.data()),

Callers 1

caf_mainFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected