Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to verify to similar characters
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00569344
Message ID:
00569708
Views:
14
You are right, I missread your code just because it looked like what I was thinking! I thought he might be looking for any duplicate character ('aaaaaaa', 'bbbbbb', 'abbcd',...), so I had something like:
PROCEDURE SimChars
	PARAMETERS tcString
	LOCAL lcLetter, i, llRetVal
	lcLetter = LEFT( tcString, 1 )
	i = 0
	llRetVal = .F.

	FOR i = 2 TO LEN( tcString )
		IF SUBSTR( tcString, i, 1 ) = lcLetter
			llRetVal = .T.
			EXIT
		ENDIF
		lcLetter = SUBSTR( tcString, i, 1 )
	ENDFOR

RETURN llRetVal
All is the same, except false became true, and true became false :[
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform