cString: PadLeft

PadLeft

Pads a strings left side.



 Public Function PadLeft(
	  ByRef s As String,
	  ByVal totalWidth As Long,
	  Optional ByRef paddingChar As Variant = 32 ) As String

Parameters

s
[ByRef] String. The string to be padded.
totalWidth
[ByVal] Long. The total length of the final string.
paddingChar
[ByRef] Optional. Variant. The character to pad the left of the string with.  

Default: 32

Return Values

String -  The padded string.

Remarks

The paddingChar parameter can accept either a number or chr$ value.

See Also

Project VBCorLib Overview Class cString Overview cString Properties cString Methods LastIndexOfAny PadRight