Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To clean a string
Message
 
 
To
15/12/2000 23:42:15
Rahul Murarka
Sys-Con Engineering
Kolkata, India
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00454334
Message ID:
00454345
Views:
33
>I want a small prog or solution to clean a string which will remove all things execpt numbers and Alphbets.

Here is yet another
? RemoveSpecial("832i#@^&*ds7fha8732h909&*%skljasfdjwe98wuqfoihasdf0987u34oijf9wuj3q)(&()^&$&Tjg&$ugf^%ut&%t7R&%T6*^&987&$yg$*%9")

FUNCTION RemoveSpecial
	PARAMETER pcString
	LOCAL lcNew, i
	
	lcNew = ""
	* loop through string and remove everything except letters and numbers
	FOR i = 1 to len(pcString)
		IF isAlpha(substr(pcString,i,1)) OR isDigit(substr(pcString,i,1))
			lcNew = lcNew + substr(pcString,i,1)
		ENDIF
	ENDFOR
RETURN UPPER(lcNew)
Previous
Reply
Map
View

Click here to load this message in the networking platform