Simplicty and flexibility!


New Function in 8 - StringFind() - Check if a string is part of another string (Ver. 8.0.0.1022)

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Function in 8 - StringFind() - Check if a string is part of another string (Ver. 8.0.0.1022)

Returns start position of StringToFind i.e larger than 0 if a string is part of a text. Returns 0 if it isn't.

int StringFind(StringToSearch,StringTofind)

It is a complimentary function to *string* which is a simply boolean function.

With StringFind you find the start of a string you look for, so you can use it to cut out a second or third string from an existing string.

you can search for the beginning of a string(you know the length of the string you search for, so the value you are really looking for starts at StringFind(StringToSearch,StringTofind)+Length(StringToFind)

if you want to return the value between to occurrences, you simply do.

MidC(StringToSearch,StringFind(StringToSearch,StringTofind)+Length(StringToFind),StringFind(StringToSearch,StringTofind2)

DataEase is fun, ne ces't pas?


Written by DataEase 11/11/11 at 10:32:10 Dataease [{8}]FIVE