Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ALINES() replacement
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00883701
Message ID:
00883714
Views:
10
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
Previous
Reply
Map
View

Click here to load this message in the networking platform