Solved

Trim a space from a string

Posted on 2002-03-21
2
187 Views
Last Modified: 2010-04-01
I'm looking for the best way to trim a spaces from a variable.  Like Trim()!
0
Comment
Question by:khagen
  • 2
2 Comments
 
LVL 33

Expert Comment

by:knightEknight
Comment Utility
String str = "  hi  there   ";
String str2 = str.trim();
0
 
LVL 33

Accepted Solution

by:
knightEknight earned 20 total points
Comment Utility
or,

<%=str.trim()%>
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now