1. Re: Win32Lib --Duh
- Posted by Greg Harris <blackdog at CDC.NET> Jan 19, 1999
- 347 views
- Last edited Jan 20, 1999
Hi Bret! I just noticed the code I sent you was a little sloppy for my standards.. it worked but wasn't well optimized.. Why use for loops when you can take advantage of Euphoria's sequence operations and bool ops. include wildcard.e --Range function originally by Hawke' --Modified by Greg Harris function range(object data, integer low, integer high) return data * (data>=low) * (data<=high) end function function isAlpha(sequence data) --checks a string to see if it contains only --valid alpha characters sequence up up = upper(data) if find(0,range(up,'A','Z')) then return 0 end if return 1 end function function isNumeric(sequence data) --checks a string to see if it contains only --valid numeric characters --Returns: 1 if all numeric -- 0 if not. if find(0,range(data,'0','9')) then return 0 end if return 1 end function ---------------------------- end code------------------------------- Hope this helps, Greg Harris