Subject:
|
Re: I need help on Delphi so I can finnish my program
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Sun, 15 Sep 2002 21:48:45 GMT
|
Viewed:
|
524 times
|
| |
 | |
In lugnet.cad.dev, Eduardo Vazquez Harte writes:
> How can I change a leter of a current selected
> line?
>
> example 1
>
> 0 3 0 5 0 0 1
>
> how can a change the second 0 witch is the
> 5th numbe from left?
>
> and a word?
>
> example 2
>
> hello Eduardo how are you.
>
> How can I change Eduardo word "name" ?
>
> please help me I need to know this.
This way may seem clunky but it is the only way I can think up off the yopp
of my head:
Extract each word to a TStringList class using the ExtractStrings procedure.
For example, assuming a string called Sentence:
ExtractStrings([' '], [' '], StringList, Sentence);
The Nth word in the sentence is now Stringlist[N-1].
Make the desired changes and then reform the string by a for statement:
Sentence := '';
for i:= 0 to StringList.Count-1 do
Sentence := Sentence + ' ' + StringList[i];
-Orion
|
|
Message has 2 Replies:  | | Re: I need help on Delphi so I can finnish my program
|
| (...) Here's a better way (I think, I haven't tested it yet); Use ExtractStrings as stated above and change the string you want to change. Then set the Delimter Property to ' ' set the QuoteChar Property to '' use the DelimitedText property to (...) (23 years ago, 16-Sep-02, to lugnet.cad.dev)
|
Message is in Reply To:
 | | I need help on Delphi so I can finnish my program
|
| How can I change a leter of a current selected line? example 1 0 3 0 5 0 0 1 how can a change the second 0 witch is the 5th numbe from left? and a word? example 2 hello Eduardo how are you. How can I change Eduardo word "name" ? please help me I (...) (23 years ago, 15-Sep-02, to lugnet.cad.dev)
|
10 Messages in This Thread:         
    
    
   
   
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|