String manipulation... 
Author Message
 String manipulation...

How do I break the string "Tom,{*filter*}, Harry" into three seperate
variables: "Tom", "Dick" and "Harry"

?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 26 May 2002 03:00:00 GMT  
 String manipulation...
names=split("Tom,{*filter*}, Harry", ", ")
for i=0 to 2
   wscript.echo names(i)
next

=-=-=
Steve
-=-=-

Quote:

> How do I break the string "Tom,{*filter*}, Harry" into three seperate
> variables: "Tom", "Dick" and "Harry"

> ?

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.



Sun, 26 May 2002 03:00:00 GMT  
 String manipulation...
Thank you very much, Steve, but I didn't state my problem completely.

How do I do it if the number of commas varies?

ex:
One user enters "Tom,{*filter*}, Harry" and another user enters "Thelma,
Louise" or any number of names.  I need to put these names into an
array.

Any and all help is very mush appreciated.



Quote:
> names=split("Tom,{*filter*}, Harry", ", ")
> for i=0 to 2
>    wscript.echo names(i)
> next

> =-=-=
> Steve
> -=-=-




Quote:
> > How do I break the string "Tom,{*filter*}, Harry" into three seperate
> > variables: "Tom", "Dick" and "Harry"

> > ?

> > Sent via Deja.com http://www.*-*-*.com/
> > Before you buy.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.


Mon, 27 May 2002 03:00:00 GMT  
 String manipulation...
names=split("Tommy,{*filter*}, Harry, Sally", ", ")

for i=0 to UBound(names)
   wscript.echo names(i)
next

=-=-=
Steve
-=-=-

Quote:

> Thank you very much, Steve, but I didn't state my problem completely.

> How do I do it if the number of commas varies?

> ex:
> One user enters "Tom,{*filter*}, Harry" and another user enters "Thelma,
> Louise" or any number of names.  I need to put these names into an
> array.

> Any and all help is very mush appreciated.



> > names=split("Tom,{*filter*}, Harry", ", ")
> > for i=0 to 2
> >    wscript.echo names(i)
> > next

> > =-=-=
> > Steve
> > -=-=-



> > > How do I break the string "Tom,{*filter*}, Harry" into three seperate
> > > variables: "Tom", "Dick" and "Harry"

> > > ?

> > > Sent via Deja.com http://www.*-*-*.com/
> > > Before you buy.

> Sent via Deja.com http://www.*-*-*.com/
> Before you buy.



Mon, 27 May 2002 03:00:00 GMT  
 String manipulation...
Thank you kindly.

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 28 May 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. string manipulation, string routines, etc.

2. String manipulation

3. String Manipulation

4. VBA String Manipulation DLL Missing

5. String manipulation in VBA

6. String Manipulation

7. String manipulation

8. Some newbie string manipulation in basic/VB...

9. string manipulation

10. String manipulation for a time field

11. Help with String manipulations

12. String manipulation

 

 
Powered by phpBB® Forum Software