Re: ÍNDICE o INDICE
Posted: Sat Apr 03, 2010 8:14 pm
Mejor es mejor que bueno. Al cambiar estas líneas usted mejorará la velocidad con la misma funcionalidad.Czarny_Pijar wrote:Me gustaría presentar la función inspirado en esgici, que cumpla con los objetivos de Algernon
I'd like to present the function inspired by esgici, that fulfills the goals of AlgernonBeware! Not tested!Code: Select all
#define cEspCharSet_1 "AÁaáBbCcDdEÉeéFfGgHhIíJjKkLlMmNnÑñOoPpQqRrSsTtUuVvWwXxYyZz" #define cEspCharSet_2 "AAaaBbCcDdEEeeFfGgHhIíJjKkLlMmNnNnOoPpQqRrSsTtUuVvWwXxYyZz" ****** * * EspAColSeq : Español Alternate Collating Sequence * FUNC EspAColSeq( cInStr ) // Español Alternate Collating Sequence LOCA cOutStr := "",; cLetter_in := "",; cLetter_out := "",; nCounter := 0,; nChrPtr := 0 FOR nCounter := 1 TO LEN( cInStr ) cLetter_in := SUBS( cInStr, nCounter, 1) nChrPtr := AT( cLetter_in, cEspCharSet_1 ) cLetter_out:= IIF( nChrPtr == 0, cLetter_in, SUBS(cEspCharSet_2, nChrPtr, 1 )) cOutStr := cOutStr + cLetter_out NEXT RETU cOutStr
Better is better than good. By changing these lines you'll improve the speed with the equal functionality.
Code: Select all
#define cEspCharSet_1 "ÁáÉéÑñ"
#define cEspCharSet_2 "AaEeNn"