asp_databases thread: string manipulation
Message #1 by jay48202@y... on Thu, 3 Oct 2002 21:56:49
|
|
Hi,
I have two strings
str1=3-x,3-y,3-z,3-w,3-u,3-v
str2=2.4,2.2,2.1,3.4,3.5,3.6
I need a third string
str3=3-x@2...,3-y@2...,3-z@2...,3-w@3...,3-u@3...,3-v@3...
How can I acheive str3 in ASP(VBScripting).
Kindly help.
Thanks in advance,
Jay
Message #2 by "Peter Foti (PeterF)" <PeterF@S...> on Thu, 3 Oct 2002 17:00:11 -0400
|
|
<%
Dim str3
str3 = CStr("3-x@2...,3-y@2...,3-z@2...,3-w@3...,3-u@3...,3-v@3...")
%>
> -----Original Message-----
> From: jay48202@y... [mailto:jay48202@y...]
> Sent: Thursday, October 03, 2002 9:57 PM
> To: ASP Databases
> Subject: [asp_databases] string manipulation
>
>
> Hi,
>
> I have two strings
>
> str1=3-x,3-y,3-z,3-w,3-u,3-v
> str2=2.4,2.2,2.1,3.4,3.5,3.6
>
> I need a third string
> str3=3-x@2...,3-y@2...,3-z@2...,3-w@3...,3-u@3...,3-v@3...
>
> How can I acheive str3 in ASP(VBScripting).
>
> Kindly help.
>
> Thanks in advance,
> Jay
>
Message #3 by "=?iso-8859-1?B?QUpBWK4=?=" <ajax@t...> on Fri, 4 Oct 2002 12:41:17 +0530
|
|
<%
dim i, str1,str2,str3
str1="3-x,3-y,3-z,3-w,3-u,3-v"
str2="2.4,2.2,2.1,3.4,3.5,3.6"
for i = 0 to ubound(split(str1,","))
str3 = str3 & "," & split(str1,",")(i) & "@" & split(str2,",")(i)
next
Response.Write(mid(str3,2))
%>
Just make sure the number of delim values in both the strings are equal
cheers,
ajax
----- Original Message -----
From: <jay48202@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Thursday, October 03, 2002 9:56 PM
Subject: [asp_databases] string manipulation
> Hi,
>
> I have two strings
>
> str1=3-x,3-y,3-z,3-w,3-u,3-v
> str2=2.4,2.2,2.1,3.4,3.5,3.6
>
> I need a third string
> str3=3-x@2...,3-y@2...,3-z@2...,3-w@3...,3-u@3...,3-v@3...
>
> How can I acheive str3 in ASP(VBScripting).
>
> Kindly help.
>
> Thanks in advance,
> Jay
>
Message #4 by jay48202@y... on Fri, 4 Oct 2002 21:06:28
|
|
Ajax,
It worked. Thank You. You saved me.
Thanks again,
Jay
> <%
dim i, str1,str2,str3
str1="3-x,3-y,3-z,3-w,3-u,3-v"
str2="2.4,2.2,2.1,3.4,3.5,3.6"
for i = 0 to ubound(split(str1,","))
str3 = str3 & "," & split(str1,",")(i) & "@" & split(str2,",")(i)
next
Response.Write(mid(str3,2))
%>
Just make sure the number of delim values in both the strings are equal
cheers,
ajax
----- Original Message -----
From: <jay48202@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Thursday, October 03, 2002 9:56 PM
Subject: [asp_databases] string manipulation
> Hi,
>
> I have two strings
>
> str1=3-x,3-y,3-z,3-w,3-u,3-v
> str2=2.4,2.2,2.1,3.4,3.5,3.6
>
> I need a third string
> str3=3-x@2...,3-y@2...,3-z@2...,3-w@3...,3-u@3...,3-v@3...
>
> How can I acheive str3 in ASP(VBScripting).
>
> Kindly help.
>
> Thanks in advance,
> Jay
>
|