Hunny Software Library Reference

ByteString.PadRight Method (Int32)

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

[Visual Basic]
Overloads Public Function PadRight( _
   ByVal totalWidth As Integer _
) As ByteString
[C#]
public ByteString PadRight(
   int totalWidth
);

Parameters

totalWidth
The number of bytes in the resulting string, equal to the number of original bytes plus any additional padding bytes.

Return Value

A new ByteString that is equivalent to this instance, but left-aligned and padded on the right with as many spaces as needed to create a length of totalWidth.
-or-
If totalWidth is less than the length of this instance, a new ByteString that is identical to this instance.

Exceptions

Exception TypeCondition
ArgumentOutOfRangeExceptiontotalWidth < 0

See Also

ByteString Class | Hunny.Base Namespace | ByteString.PadRight Overload List