• Web sitemizin içeriğine ve tüm hizmetlerimize erişim sağlamak için Web sitemize kayıt olmalı ya da giriş yapmalısınız. Web sitemize üye olmak tamamen ücretsizdir.
  • Sohbetokey.com ile canlı okey oynamaya ne dersin? Hem sohbet et, hem mobil okey oyna!
  • Soru mu? Sorun mu? ''Bir Sorum Var?'' sistemimiz aktiftir. Paylaşın beraber çözüm üretelim.

Karakter doldurma

Üyelik Tarihi
7 Ocak 2015
Konular
4,091
Mesajlar
4,274
MFC Puanı
40
Kod:
Function ustrTekrarla(Const AText : String; ACount : Integer) : String;
Var
  P                 : PChar;
  C                 : Integer;
Begin
  C := Length(AText);
  SetLength(Result, C * ACount);
  P := Pointer(Result);
  If P = Nil Then
    Exit;
  While ACount > 0 Do
  Begin
    Move(Pointer(AText)^, P^, C);
    Inc(P, C);
    Dec(ACount);
  End;
End;


// örnek;
procedure TForm1.Button1Click(Sender: TObject);
var
   a: string;
begin
a:= ustrTekrarla('y',10);
ShowMessage(a);
a:= ustrTekrarla('t',10);
ShowMessage(a);
end;
 
Üst