Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALINES() replacement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00883701
Message ID:
00883714
Vues:
11
Just realized I was using another UDF, sorry:
*******************************************************************************
*                                                                             *
* Name         : xatchar.prg                                                  *
*                                                                             *
* Description  : This function is used to determine which of the characters   *
*                from mchars parameter is the first to appear in mstring      *
*                                                                             *
* Parameters   : mstring    - (C) The source string                           *
*                   default = [Mandatory]                                     *
*                mchars     - (C) The charset we are interested in            *
*                   default = [Mandatory]                                     *
*                                                                             *
* Returns      : (N) The position of the first occurrence of a character from *
*                mchars in mstring                                            *
*******************************************************************************

parameters mstring, mchars
private mstring, mchars, i, mlen

mlen=len(mstring)
for i=1 to mlen
	if substr(mstring, i, 1)$mchars
		return i
	endif
next i
return 0
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform