find a string within another string

Questions about GP commands and how to do things

Moderator: MSandro

Post Reply
SimpleSi
Posts: 330
Joined: Jul 2nd, '17, 13:47

find a string within another string

Post by SimpleSi » Aug 6th, '17, 18:45

is there a function to see if a string exists withing another string?

If not - whats the shortest way of doing it?

Simon

SvenJ
Posts: 25
Joined: Jul 6th, '17, 08:03

Re: find a string within another string

Post by SvenJ » Aug 7th, '17, 08:46

Hey,

While I couldn't find a way to get this to work with Strings directly, I found a way to make this work by using the following blocks:

The "contains"-Block can check if an item exists in an array (NOT a list!). Using it the way I did in the attached image returns "true".
Attachments
scriptImage.png
scriptImage.png (2.78 KiB) Viewed 10836 times
Screenshot from 2017-08-07 10-45-06.png
Screenshot from 2017-08-07 10-45-06.png (4.41 KiB) Viewed 10836 times

Post Reply