[#BloombergLP-bdlb-String-pad-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::pad :relfileprefix: ../../../ :mrdocs: Append repeatedly to the specified `string` the optionally specified `padChar` until `string` has the specified `length`. If `padChar` is not specified the space (` `) character is appended. This operation has no effect if `string.size() >= length`. The behavior is undefined unless `0 <= length`. == Synopsis Declared in `<bdlb_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void pad( xref:bsl/string.adoc[bsl::string]* string, int length, char padChar = ' '); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#