RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.StringOfChar Function

Returns a string with a specified number of repeating characters.

Pascal
function StringOfChar(ch: AnsiChar; Count: Integer): AnsiString; overload;
function StringOfChar(ch: WideChar; Count: Integer): WideString; overload;
C++
AnsiString StringOfChar(AnsiChar ch, int Count);
BSTR StringOfChar(WideChar ch, int Count);

System

In Delphi code, StringOfChar returns a string containing Count characters with the character value given by Ch. For example, 

S := StringOfChar('A', 10); 

sets S to the string 'AAAAAAAAAA'. 

 

FillChar 

DupeString

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!