Creates a string with one character repeated many times System unit
 function StringOfChar ( RepeatCharacter : Char; RepeatCount : Integer ) : string;
The StringOfChar function creates a new string of length RepeatCount, filled by RepeatCharacter characters.
This function avoids the need for a for loop, or tedious typing.
Related commands
Concat Concatenates one or more strings into one string
Copy Create a copy of part of a string or an array
Delete Delete a section of characters from a string
DupeString Creates a string containing copies of a substring
Insert Insert a string into another string
Move Copy bytes of data from a source to a destination
SetString Copies characters from a buffer into a string
StringReplace Replace one or more substrings found within a string
StuffString Replaces a part of one string with another
WrapText Add line feeds into a string to simulate word wrap
 Author links

 Buy Website Traffic at

 Buy Proxies at
 Download this web site as a Windows program.

Example code : Display a heading with underline characters beneath
  text, line : string;

  // Write a heading with -'s as underline characters
  text := '1.An introduction to life as we know it';
  line := StringOfChar('-', Length(text));

  // Display our underlined heading
Show full unit code
   1.An introduction to life as we know it
Delphi Programming Neil Moffatt 2002 - 2016. All rights reserved.  |  Home Page