Compare numeric strings with leading zeros
J. Landman Gay
jacque at hyperactivesw.com
Thu Sep 3 15:20:19 EDT 2015
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
More information about the use-livecode
mailing list