Something like charIndex, but in a variable...

dunbarx at aol.com dunbarx at aol.com
Thu Apr 30 09:33:43 EDT 2015


How about this, assuming the chunk you want is the second word:



on mouseUp
   put fld 1 into temp
   answer offset(char 1 of word 2 of temp,temp) 
   answer offset(char (the number of chars of word 2 of temp) of word 2 of temp,temp)
end mouseUp


Craig


-----Original Message-----
From: Mark Schonewille <m.schonewille at economy-x-talk.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Thu, Apr 30, 2015 8:00 am
Subject: Re: Something like charIndex, but in a variable...


Hi Malte,

If using a field is the only solution, try the
templateField.

--
Kind regards,

Mark
Schonewille
Economy-x-Talk
Http://economy-x-talk.com

Share the clipboard of
your computer over a local network with Clipboard Link
http://clipboardlink.economy-x-talk.com


Op 30 apr. 2015 om 10:07 heeft Malte
Brill <revolution at derbrill.de> het volgende geschreven:

> Hi all,
> 
> I need
to find the start and end character of chuncks in a variable. If we are in a
field we can use charIndex for that. However, in a variable I have no good idea
on how to do something similar to
> 
> get charIndex(token 7 of line 15 of field
„myField“)
> 
> 
> Any ideas?
> 
> All the best,
> 
> Malte
> 
> 
>
_______________________________________________
> use-livecode mailing list
>
use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe
and manage your subscription preferences:
>
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode
mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe,
unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
 



More information about the use-livecode mailing list