Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transforming string representation
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00564145
Message ID:
00564213
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
lcStrIn = "between(price, 100,1000000)"
lcStrOut = ""
llDigit = .F.
FOR i=1 TO Len( lcStr)
	lcCurChar = Substr( lcStrIn, i, 1 )
	IF Isdigit(lcCurChar) AND NOT llDigit 
		lcStrOut = lcStrOut + "$" + lcCurChar
	ELSE
		lcStrOut = lcStrOut + lcCurChar
	ENDIF

	llDigit = Isdigit(lcCurChar)

ENDFOR
?
?lcStrIn
? lcStrOut 
>Hi everybody,
>
>I have a form, where the user can make selection criteria. On this form I have a button, which says: "Show criteria".
>If I have this kind of criterion, for example, PRICE<=5000000, I'm thinking about presenting it as PRICE<=$5,000,000. My question is: how can I perform such string modifications? As you understand, I return each criterion as a string lcCrit, so it might be "between(price, 100,1000000)" for another example.
>
>Thanks in advance.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform