Removing blank space before and after a string in ASPWe can remove blank spaces present before a string or after a string by using different functions in ASP. This is required in many string handling jobs and especially when user enters a data in a form. Some users may add space before or after entering their user id or password. They may not know or identify about the extra space they entered and the validation of id or password will fail because of extra space entered before or after entering the data.
We can remove blank space present before or after the string by using ltrim, rtrim and trim functions. Let us start with an example on how to remove space before the string.
The output of the above code is here
|ASP functions to handle string|
Adding two or more strings in ASP
Getting the size or length of the string by using len() function
Removing blank space before and after a string using trim function
Changing lower to upper or upper to lower case of text present inside a string
Reversing a string variable by using StrReverse function
Compare two strings in different ways by using StrComp function
Collecting parts from Left , right and middle areas of a string
Checking matching of a string inside another string using InStr function
Searching and replacing strings inside another string using Replace function
Creating arrays by splitting string using split() function
Joining elements of an array to create a string variable
Line Break by replacing text line break to html line break using Replace function