Thema: Delphi Probleme mit SetLength

Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#4

Re: Probleme mit SetLength

  Alt 26. Feb 2009, 10:46
Hallo,

mal eine kleine Frage, warum willst Du den String mit SetLength kürzen.

Du könntest auch die Prozedur delete nehmen.
Zitat von DelphiHilfe:
procedure Delete(var S: string; Index, Count:Integer);

Description

Delete removes a substring of Count characters from string S starting with S[Index]. S is a string-type variable. Index and Count are integer-type expressions.

If index is larger than the length of the S or less than 1, no characters are deleted.

If count specifies more characters than remain starting at the index, Delete removes the rest of the string. If count is less than 0, no characters are deleted.
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat