Sub String function

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

MarkW
Flowcode v5 User
Posts: 118
Joined: Thu Sep 17, 2009 1:30 pm
Has thanked: 3 times
Been thanked: 11 times
Contact:

Sub String function

Postby MarkW » Sat Jan 06, 2018 8:15 am

Hello

Is there a string function in FC that allows you to search for a
string within a string?

Or has anyone done an example of how to do this? I have some ideas
but would prefer some example that has already been done

Thanks

Mark

tiny
Posts: 155
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 38 times
Been thanked: 65 times
Contact:

Re: Sub String function

Postby tiny » Sun Jan 07, 2018 12:39 pm

I hope you can read this file because I created it with FC 7.
This example looks for xFind in xString, Mode is Case Sensitive (0) or Case Insensitive (1).
The exact position is output, even if the search string is in the first place (result 0). If nothing is found, the search result is -1.
I hope it meets your wishes.

Christina
Stringsearch.fcfx
(12.01 KiB) Downloaded 13 times
These users thanked the author tiny for the post:
Benj (Mon Jan 15, 2018 6:15 pm)
Rating: 5.88%
 

tiny
Posts: 155
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 38 times
Been thanked: 65 times
Contact:

Re: Sub String function

Postby tiny » Sat Jan 13, 2018 9:27 pm

Could you do something with the program example?
Christina