CATEGORIES
Remove Carriage Returns and Line Feeds from ASP Page
Published by: Guest (10/20/2008 2:01:05 PM)
OCT 20 2008
I have a string which seems to have line feed and carriage return at the end, i want to replace with nothing. I know there is a way to replace it but i am not very sure how to remove a carriage return and line feed from a string. If know the way then please advice me here.
Most Popular Articles
- HOW TO PUBLISH A PROJECT IN LOCAL IIS OR OWN MACHINE
- Request object error 'ASP 0104 : 80004005' Operation not Allowed
- Remove Carriage Returns and Line Feeds from ASP Page
- Why do I get error WinHttp.WinHttpRequest error '80072ee2' The operation timed out
- How to Find the Time Difference in ASP
What is Escape Function in ASP >>
<< How the Replace function Works in ASP
COMMENT
Name: Guest
There will be chr(13) and chr(10) so use the replace function to remove it.
str_example = replace(str_example, chr(13), chr(10))
If you are in doubt if you have such characters in the string then use escape() function to check it.
Name: Jim Davidson
Uhmmm... this is more like it:
str_example = replace(str_example, chr(13), "" )
str_example = replace(str_example, chr(10), "")
You code replaces chr(13) with chr(10)