Dark_King
asked on
I need no space at end of my string
I Need to read from a file and
I don’t now the length of "Ch6"
It can be 18 character long
I put it in a form.edit.text
and I need not the space from right.
I try the TrimRight but it take the space to
ex1…
Edit3.Text:=TrimRight(copy (Ch6,20,18 ));
ex2..
Edit3.Text:=copy(Ch6,20,18 );
Edit3.Text:=TrimRight(Edit 3.Text)
……………………………..
I test the length on Edit3 and it still is 18
Edit7.Text:=IntToStr(Lengt h(Edit3.Te xt));
Are I stupid or is it wrong to do like this..
Help/janne
I don’t now the length of "Ch6"
It can be 18 character long
I put it in a form.edit.text
and I need not the space from right.
I try the TrimRight but it take the space to
ex1…
Edit3.Text:=TrimRight(copy
ex2..
Edit3.Text:=copy(Ch6,20,18
Edit3.Text:=TrimRight(Edit
……………………………..
I test the length on Edit3 and it still is 18
Edit7.Text:=IntToStr(Lengt
Are I stupid or is it wrong to do like this..
Help/janne
I you sure that the last character is a chr(32) and not a different one ?? And have you tried to use TRIM ??
ASKER
I read from a text file and it is space after a word
Ex
002af608a7e8 RUM322 Rum322-01
Example if I need the RUM322 I copy start to length (Fixed length) 18 characters ..
In this case copy(Ch6,19,18);
then I reg. it to windows register
It while be wrong if I not can use TRIM
Ex
002af608a7e8 RUM322 Rum322-01
Example if I need the RUM322 I copy start to length (Fixed length) 18 characters ..
In this case copy(Ch6,19,18);
then I reg. it to windows register
It while be wrong if I not can use TRIM
ASKER
I read file like this
if FileExists(mac1) Then
begin
AssignFile(F1, mac1) ;
Reset(F1);
while not Eof(F1) do
begin
Readln(F1, Ch6);
if FileExists(mac1) Then
begin
AssignFile(F1, mac1) ;
Reset(F1);
while not Eof(F1) do
begin
Readln(F1, Ch6);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is edit2.text = 6 or 18
I wont it to be 6
I wont it to be 6
In my sample it have a length of 6.
ASKER
I stupide I look at frong text
Sorry
you still Earn the 10 points
Thanks
Sorry
you still Earn the 10 points
Thanks
:-)