[#BloombergLP-bdlb-String-toFixedLength] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::toFixedLength :relfileprefix: ../../../ :mrdocs: Copy into the specified `dstString` at most the specified leading `dstLength` characters from the specified `srcString` having the specified `srcLength`. If `srcLength < dstLength`, after `srcString` is copied to `dstString` repeatedly append to `dstString` the optionally specified `padChar` until the total number of characters written to `dstString` is `dstLength`. If `padChar` is not specified the space (` `) character is appended. The behavior is undefined unless `0 <= dstLength` and `0 <= srcLength`. == Synopsis Declared in `<bdlb_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void toFixedLength( char* dstString, int dstLength, char const* srcString, int srcLength, char padChar = ' '); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#