[Gambas-user] about string manipulating and replace$()
rospolosco at ...152...
rospolosco at ...152...
Sun Jun 19 19:01:13 CEST 2005
Hi.
Firtst of all I want to thank Benoit for his fantastic software: gambas is
absolutely *** G R E A T !!!***.
I'm working on a program. In this program I have to compare millions of
string, one compared to another one, to know how many chars of string1
are equal and in the same position in string2. Example:
string1 = "1234567"
string2 = "0004007"
Result = 2. In fact "4" and "7" are equal and in the same position.
At this moment, I do the job using a FOR and Mid$(), but the process
take a very long time when you have to compare thousands or million of
strings.
I think we should reduce the time for processes like this one, if gambas
had natively a function for that purpose ( Please, Benoit....) Example:
Result = The_Function$("1234567", "0004007")
> 2
Please, somebody has a suggestion to speed up the process?
Request for Benoit:
Is possible to implement in Replace$() the model in square brackets
as in the LIKE operator?
I mean:
Replace$("Gambas me gusta muchissimo", [^a-a],"")
> aaa
Thanks.
More information about the User
mailing list