Page 1 of 1

[Implemted] FindString() default StartPosition = 1

Posted: Mon Aug 13, 2007 10:26 am
by Leonhard
Why is the Parameter 'StartPosition' not default/optimal with 1?

Re: FindString(String$, StringToFind$, StartPosition = 1)

Posted: Mon Aug 13, 2007 11:32 am
by PB
It's an option so you can start searches anywhere in the string.
Is typing ",1" (only 2 characters) too much hassle for you? :)

Posted: Mon Aug 13, 2007 8:06 pm
by Flype
yes but it's true that's better this way :

FindString(String$, StringToFind$[, StartPosition])


not very important...

Posted: Mon Aug 13, 2007 8:30 pm
by Leonhard
Flype wrote:yes but it's true that's better this way :

FindString(String$, StringToFind$[, StartPosition])


not very important...
yes, it is true!
But the default-Value is 1!

Posted: Mon Aug 13, 2007 8:51 pm
by ts-soft
Simple use a macro.

Posted: Mon Aug 13, 2007 9:31 pm
by Kaeru Gaman
maybe Leonhard does not use the third parameter...

but FindString reveals it's power only with using the third parameter...

Code: Select all

a$ = "the poop quick poop brown poop fox poop jumps poop over poop the poop lazy poop dog"
Pos = 0
Repeat
  Pos = FindString( a$, "poop", Pos+1 )
  Debug Pos
Until Pos = 0 

Posted: Wed Jan 09, 2008 1:02 pm
by mskuma
I personally agree, it would be nice if this parameter is made optional (dare I hazard a guess that it's usually '1' for a high percentage of people's programs?). I was reminded about this idea when I saw that in the latest beta:
- Changed: last Mid() parameter optional
I think this suggestion is vaguely in the same vein as this change.