MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / pad

Function pad

benchmarks/dlib/string/string.h:772–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770 typename alloc
771 >
772 const std::basic_string<charT,traits,alloc> pad (
773 const std::basic_string<charT,traits,alloc>& str,
774 long pad_length,
775 const std::basic_string<charT,traits,alloc>& pad_string
776 )
777 {
778 const long str_size = static_cast<long>(str.size());
779 return rpad(lpad(str,(pad_length-str_size)/2 + str_size,pad_string),
780 pad_length,
781 pad_string);
782 }
783
784 template <
785 typename charT,

Callers

nothing calls this directly

Calls 3

rpadFunction · 0.85
lpadFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected