|
 |
asp_web_howto thread: integer part of string
Message #1 by "Oliver Dempsey" <odempsey@b...> on Mon, 16 Apr 2001 18:11:04 +0100
|
|
Hi there
Is there a function in VB script to strip an integer and a string from a
string or do I need to create one myself?
for example if I want to return integer =3D 45 and string =3D
"California" from "45California"
Regards
Oliver
Message #2 by Roger Balliger <Roger@i...> on Mon, 16 Apr 2001 10:28:50 -0700
|
|
Oliver,
To my knowledge, No, there is no parse command to do what you want. If the
strings are consistent, you could create a function to do the trick. Just
use a LEFT or RIGHT prune command. If there are multiple strings in a RS,
create a for....next loop to go through all the records.
Good luck.
Roger
-----Original Message-----
From: Oliver Dempsey [mailto:odempsey@b...]
Sent: Monday, April 16, 2001 10:11 AM
To: ASP Web HowTo
Subject: [asp_web_howto] integer part of string
Hi there
Is there a function in VB script to strip an integer and a string from a
string or do I need to create one myself?
for example if I want to return integer = 45 and string = "California" from
"45California"
Regards
Oliver
Message #3 by "Oliver Dempsey" <odempsey@b...> on Tue, 17 Apr 2001 09:32:13 +0100
|
|
Thanks Roger
at least I won't be waisting time looking for one to do it.
Regards
Oliver
----- Original Message -----
From: Roger Balliger <Roger@i...>
To: ASP Web HowTo <asp_web_howto@p...>
Sent: Monday, April 16, 2001 6:28 PM
Subject: [asp_web_howto] RE: integer part of string
> Oliver,
>
> To my knowledge, No, there is no parse command to do what you want. If the
> strings are consistent, you could create a function to do the trick. Just
> use a LEFT or RIGHT prune command. If there are multiple strings in a RS,
> create a for....next loop to go through all the records.
>
> Good luck.
> Roger
>
> -----Original Message-----
> From: Oliver Dempsey [mailto:odempsey@b...]
> Sent: Monday, April 16, 2001 10:11 AM
> To: ASP Web HowTo
> Subject: [asp_web_howto] integer part of string
>
>
> Hi there
> Is there a function in VB script to strip an integer and a string from a
> string or do I need to create one myself?
> for example if I want to return integer = 45 and string = "California"
from
> "45California"
>
> Regards
> Oliver
>
>
Message #4 by "phil hamm" <philiphamm@h...> on Tue, 17 Apr 2001 11:57:21 -0400
|
|
with JScript there is a function which will return the numeric part of a
string parseint() but I could not find the equivalent in VBscript
>From: "Oliver Dempsey" <odempsey@b...>
>Reply-To: "ASP Web HowTo" <asp_web_howto@p...>
>To: "ASP Web HowTo" <asp_web_howto@p...>
>Subject: [asp_web_howto] RE: integer part of string
>Date: Tue, 17 Apr 2001 09:32:13 +0100
>
>Thanks Roger
>at least I won't be waisting time looking for one to do it.
>
>Regards
>Oliver
>
>
>----- Original Message -----
>From: Roger Balliger <Roger@i...>
>To: ASP Web HowTo <asp_web_howto@p...>
>Sent: Monday, April 16, 2001 6:28 PM
>Subject: [asp_web_howto] RE: integer part of string
>
>
> > Oliver,
> >
> > To my knowledge, No, there is no parse command to do what you want. If
>the
> > strings are consistent, you could create a function to do the trick.
>Just
> > use a LEFT or RIGHT prune command. If there are multiple strings in a
>RS,
> > create a for....next loop to go through all the records.
> >
> > Good luck.
> > Roger
> >
> > -----Original Message-----
> > From: Oliver Dempsey [mailto:odempsey@b...]
> > Sent: Monday, April 16, 2001 10:11 AM
> > To: ASP Web HowTo
> > Subject: [asp_web_howto] integer part of string
> >
> >
> > Hi there
> > Is there a function in VB script to strip an integer and a string from a
> > string or do I need to create one myself?
> > for example if I want to return integer = 45 and string = "California"
>from
> > "45California"
> >
> > Regards
> > Oliver
> >
>
|
|
 |