Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear control codes from string
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Clear control codes from string
Miscellaneous
Thread ID:
00860937
Message ID:
00860937
Views:
56
An editbox allows my user to enter a sring. The user may enter a control code, like a CRLF, which is not desired in the string.

Right now to clear these codes, my project calls a fuction to loop through the string:
FOR c=1 TO LEN(lcCommand)
IF ASC(SUBSTR(lcCommand,c,1))<32 or ASC(SUBSTR(lcCommand,c,1))>122
   lcCommand=STUFF(lcCommand,c,1," ")
ELSE 
ENDIF 
ENDFOR 
RETURN ALLTRIM(lcCommand)
Is there an inline fuction that would be more appropriate?
Imagination is more important than knowledge
Next
Reply
Map
View

Click here to load this message in the networking platform