What's the fastest way to take an input string of unknown length, and determine if it ONLY consists entirely of alphanumeric digits?
Better methods?
Best regards,
Rick C. Hodgin
Code:
lcX = ALLTRIM(table.field) && non-binary memo field varying from 0 to ~6,000 bytes
llAN = .t. && flag for "is alphanumeric?"
FOR lnI = 1 to LEN(lcX)
lcC = SUBSTR(lcX,lnI,1)
IF NOT ISALPHA(lcC) OR NOT ISDIGIT(lcC)
* It is something other than A-Z_a-z_0-9
llAN = .f.
EXIT
ENDIF
NEXT
* llAN holds the AlphaNumeric status
Better methods?
Best regards,
Rick C. Hodgin