PDA

View Full Version : Trimming a whole string in asp


Gerbill
04-04-2004, 02:51 AM
Hello there I am trying to do a search on a "Product Title" and a "Product Description". Now what I want to do is "Trim" all the space from the whole title/description so that I can search for a string within that title/description.

i.e. I want to search "This is a new topic" but I want to search it like "Thisisanewtopic".

If you can help if would be muchly appreciated.

Gerbill

See what I mean, hear what I say, listen for my words~

steurm
04-05-2004, 02:29 AM
If the only thing you need is to replace the " " by "", then that is what you have to do (example in C#):

[quote]stringsInput="Thisisanewtopic";
stringsSearchFor=sInput.Replace("","");
//nowsSearchFor="Thisisanewtopic"
</CODE>


Hope it helps

--
Steurm
www.steurm.net/steurm

Gerbill
04-05-2004, 08:25 AM
Yeah that is what I wanted. That is great help. That is what I was going to do but I did it another way but that is great help.

Thanks alot,
Gerbill

See what I mean, hear what I say, listen for my words~