Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for Side-By-Side matching characters
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00798873
Message ID:
00798883
Views:
27
This message has been marked as the solution to the initial question of the thread.
>Does anyone have a way to check a string to ensure that there are not two like characters side by side. This is for a password validation routine?
>
>Thanks

You can do something like
llOk = .T.
FOR i=1 TO LEN(lcStr)-1
  IF SUBSTR(lcStr,i) = SUBSTR(lcStr,i+1)
    llOk = .F.
    EXIT
  ENDIF
ENDIF
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform