logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Autism Spectrum Disorders: 4:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Trim ASP String Function


Trim is a commonly used ASP function that allows you to quickly remove any extra spaces at the beginning or ending of a string. It takes in one parameter:

* The string variable to operate on

The original string variable is not altered.

This is pretty much a required thing to do to ANY field a user types in for you to use. Users are notorious for putting extra spaces at the beginning or end of their input.

Let's say your user puts in their name and you take this in as UserName. But say the user has poor typing skills and you now get:

UserName = " Lisa Shea "

with extra spaces. You would use

UserName = Trim(UserName)

To turn that into just "Lisa Shea" with no spaces. Note that it leaves any spaces WITHIN the string - between the Lisa and the Shea. It only removes extra spaces at the beginning or end.

ASP String Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
Add Trim+ASP+String+Function to Twitter Add Trim+ASP+String+Function to Facebook Add Trim+ASP+String+Function to MySpace Add Trim+ASP+String+Function to Del.icio.us Digg Trim+ASP+String+Function Add Trim+ASP+String+Function to Yahoo My Web Add Trim+ASP+String+Function to Google Bookmarks Add Trim+ASP+String+Function to Stumbleupon Add Trim+ASP+String+Function to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor