MCPcopy Create free account
hub / github.com/AnetaTexler/FaceBlit / pad

Function pad

VS/include/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 1

string_testFunction · 0.50

Calls 3

rpadFunction · 0.70
lpadFunction · 0.70
sizeMethod · 0.45

Tested by 1

string_testFunction · 0.40