xtd 0.2.0
Loading...
Searching...
No Matches

◆ pad_right() [3/4]

ustring xtd::ustring::pad_right ( size_t  total_width,
value_type  padding_char 
) const
noexcept

Left-aligns the characters in this string, padding with spaces on the right for a specified total length.

Parameters
totalWidthThe number of characters in the resulting string, equal to the number of original characters plus any additional padding characters.
paddingCharAn unicode padding character.
Returns
A new string that is equivalent to the specified string, but left-aligned and padded on the tight with as many spaces as needed to create a length of totalWidth. Or, if totalWidth is less than the length of the specified string, a new string object that is identical to the specified string.
Remarks
An unicode space is defined as hexadecimal 0x20.
The xtd::ustring::pad_right method pads the end of the returned string. This means that, when used with right-to-left languages, it pads the left portion of the string..