help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

AddChar

Add characters to the left of a string till a certain length

Declaration

Source position: strutils.pp line 140

function AddChar(

  C: Char;

  const S: String;

  N: Integer

):String;

Arguments

C

  

Char to be added

S

  

The string to be treated

N

  

The minimal length the string should have

Function result

The resulting string with length N

Description

AddChar adds characters (C ) to the left of S till the length N is reached, and returns the resulting string. If the length of S is already equal to or larger than N , then no characters are added. The resulting string can be thought of as a right-aligned version of S , with length N .

Errors

None

See also

AddCharR

  

Add chars at the end of a string till it reaches a certain length

PadLeft

  

Add spaces to the left of a string till a certain length is reached.

PadRight

  

Add spaces to the right of a string till a certain length is reached.

PadCenter

  

Pad the string to a certain length, so the string is centered.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505