MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / pad

Function pad

include/jwt-cpp/base.h:279–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 }
278
279 inline std::string pad(const std::string& base, const std::string& fill) {
280 std::string padding;
281 switch (base.size() % 4) {
282 case 1: padding += fill; JWT_FALLTHROUGH;
283 case 2: padding += fill; JWT_FALLTHROUGH;
284 case 3: padding += fill; JWT_FALLTHROUGH;
285 default: break;
286 }
287
288 return base + padding;
289 }
290
291 inline std::string trim(const std::string& base, const std::string& fill) {
292 auto pos = base.find(fill);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected