MCPcopy Create free account
hub / github.com/apache/trafficserver / transform_lower

Function transform_lower

include/tsutil/Convert.h:37–45  ·  view source on GitHub ↗

Copy @a src to @a dst, transforming to lower case. * * @param src Input string. * @param dst Output buffer. */

Source from the content-addressed store, hash-verified

35 * @param dst Output buffer.
36 */
37inline void
38transform_lower(std::string_view src, swoc::MemSpan<char> dst)
39{
40 if (src.size() > dst.size() - 1) { // clip @a src, reserving space for the terminal nul.
41 src = std::string_view{src.data(), dst.size() - 1};
42 }
43 auto final = std::transform(src.begin(), src.end(), dst.data(), [](char c) -> char { return std::tolower(c); });
44 *final++ = '\0';
45}
46} // namespace ts

Callers 5

load_sni_configMethod · 0.85
getMethod · 0.85
insertMethod · 0.85
lookupMethod · 0.85
reverse_dns_nameFunction · 0.85

Calls 5

tolowerFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected