Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to verify to similar characters
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00569344
Message ID:
00569708
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform