JCL Help:StrPadLeft@AnsiString@SizeInt@AnsiChar

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Left pads a string with characters.


Pascal

 function StrPadLeft(const S: string; Len: SizeInt; C: Char = NativeSpace): string;
function StrPadLeft(const S: AnsiString; Len: SizeInt; C: AnsiChar = AnsiSpace): AnsiString;


Parameters

Parameters Description
const S: string Source string to left pad.
Len: SizeInt The length of the resulting string.
C: Char = NativeSpace The character to pad the string with.


Return Value

The string left padded with the specified character.


Description

StrPadLeft left pads a string with the specified character until the resulting string is Len characters long. If the source string is already greater than or equal in length to Len the function does nothing.


See Also

StrPadRight StrCenter


About

Unit

JclAnsiStrings


Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page