Einzelnen Beitrag anzeigen

Benutzerbild von alleinherrscher
alleinherrscher

Registriert seit: 8. Jul 2004
Ort: Aachen
797 Beiträge
 
Delphi XE2 Professional
 
#3

Re: text in best form in einer txt speichern...

  Alt 25. Mai 2006, 14:43
du kannst doch einfach den Text in ein String einladen

dann zerteilst du den String mit dem Befehl hier:

Returns a substring of a string or a segment of a dynamic array.

Unit

System

Category

string handling routines

function Copy(S; Index, Count: Integer): string;
function Copy(S; Index, Count: Integer): array;

Description

S is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or sub array containing Count characters or elements starting at S[Index].

If Index is larger than the length of S, Copy returns an empty string or array.

If Count specifies more characters or array elements than are available, only the characters or elements from S to the end of S are returned.

Note: When S is a dynamic array, Copy can only be used as a parameter in a call to a procedure or function that expects an array parameter. That is, it acts like the Slice function when working with dynamic arrays.


Delphi-Quellcode:

//Pseudocode:

neuerstring:=Copy(meinText,1,einfuegposition)+einfuegtext+copy(meinText,einfuegposition+1,length(meinText)-einfuegposition-1)
Mit dem -/+ 1 musst du nochmal genau nachgucken...
„Software wird schneller langsamer als Hardware schneller wird. “ (Niklaus Wirth, 1995)

Mein Netzwerktool: Lan.FS
  Mit Zitat antworten Zitat