Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Leading (double) quotation marks and StrReplace
Fri, May 1 2015 1:12 PMPermanent Link

Doc

procedure TForm1.Button1Click(Sender: TObject);
var
String1, String2: String;
begin
String1 := '"this is a test';
String2 := StrReplace (String1, '"', '', true, false);
Label1.Caption := String2;
end;

Tried to eliminate leading quotation marks.
In EWB1 the result is (as expected): this is a test
In EWB2 the result is: "this is a testthis is a test

Another issue for the final release?
Sat, May 2 2015 2:59 AMPermanent Link

Doc

Oh, its a big one.

Didn't test it much, but it does not only occur with quotation marks, but with any character (at first place of a String):

String1 := 'zthis is a test';
String2 := StrReplace (String1, 'z', '', true, false);

leads to Str2 as zthis is a testthis is a test

Wonder why at all the StrReplace function has changed in EWB2b5, thought it was just a translation to javascript.
Sat, May 2 2015 3:41 AMPermanent Link

Doc

This strange behavior allways occurs when the search string is the first character.
Even stranger when it's the first and second (and third) character.

String1 := 'zthis is a ztest';
String2 := StrReplace (String1, 'z', '*', true, false);
-> zthis is a ztest*this is a *test

String1 := 'zzthis is a ztest';
String2 := StrReplace (String1, 'z', '*', true, false);
-> zzthis is a ztest*zthis is a ztest*this is a *test

String1 := 'zzzthis is a ztest';
String2 := StrReplace (String1, 'z', '*', true, false);
-> zzzthis is a ztest*zzthis is a ztest*zthis is a ztest*this is a *test

PLEASE get that fixed for the release !
Sat, May 2 2015 6:32 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Doc,

<< Tried to eliminate leading quotation marks.
In EWB1 the result is (as expected): this is a test
In EWB2 the result is: "this is a testthis is a test >>

It's a bug in the Copy() function, and is now fixed.

Tim Young
Elevate Software
www.elevatesoft.com
Image