Compare numeric strings with leading zeros
Ralph DiMola
rdimola at evergreeninfo.net
Thu Sep 3 15:48:24 EDT 2015
Agreed + 1.
Although the "x"&MyPassword or checking the length will work it seems that
matchText is a lot cleaner and easier to read in the future.
Thank All!
Thanks Thierry... matchText it is!
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of J. Landman Gay
Sent: Thursday, September 03, 2015 3:20 PM
To: How to use LiveCode
Subject: Re: Compare numeric strings with leading zeros
On 9/3/2015 2:28 AM, Thierry Douez wrote:
> You can use build-in functions which manipulate strings.
>
> Please, try this one:
>
> on mouseUp
> local userTyping = 5
> local myVeryStrongPassword = "005"
> if matchText( userTyping, myVeryStrongPassword) then
> answer "Great!"
> else
> answer "Too bad :( try again.."
> put "005" into userTyping
> if matchText( userTyping, myVeryStrongPassword) then answer
"Great!"
> end if
> end mouseUp
Very clever. This would be my chosen solution.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
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