Finding two spaces in a string

J

J. Muenchbourg

I'm trying to do some len(string) , instr (string, arg) function combos
to detect a string that has at least two spaces, whereas I want to
eliminate that second space " " and concatenate the remainder of the
string into the second portion of the string. Any ideas, or web links
that can point me to a good source?

Thx
Muench
 
A

Aaron Bertrand - MVP

<%
str = " foo fooo oo o o o o bar "
do while instr(str, " ")>0
str = replace(str, " ", " ")
loop
response.write str
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top