[#BloombergLP-bdlb-String-pad-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::pad
:relfileprefix: ../../../
:mrdocs:

Pad `string` on the right with `padChar` up to `length`&period;

== Synopses

Declared in `&lt;bdlb&lowbar;string&period;h&gt;`

Pad `string` on the right with `padChar` up to `length`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bdlb/String/pad-02.adoc[pad](
    xref:bsl/string.adoc[bsl::string]* string,
    int length,
    char padChar = &apos; &apos;);
----

[.small]#xref:BloombergLP/bdlb/String/pad-02.adoc[_» more&period;&period;&period;_]#

Pad `string` on the right with `padChar` up to `length`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bdlb/String/pad-0e.adoc[pad](
    std::pmr::string* string,
    std::pmr::string::size&lowbar;type length,
    char padChar = &apos; &apos;);
----

[.small]#xref:BloombergLP/bdlb/String/pad-0e.adoc[_» more&period;&period;&period;_]#

Pad `string` on the right with `padChar` up to `length`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bdlb/String/pad-08.adoc[pad](
    std::string* string,
    int length,
    char padChar = &apos; &apos;);
----

[.small]#xref:BloombergLP/bdlb/String/pad-08.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *string*
| string to pad
| *length*
| desired length after padding
| *padChar*
| character used for padding (default space)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
