Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   trimming a variable. (http://www.velocityreviews.com/forums/t788737-trimming-a-variable.html)

mario c 07-21-2003 10:57 PM

trimming a variable.
 

I need to trim a variable to have everything after 4 chars in a string.

IE:

var_temp = 200:16:1234567890

i want everything after 200: to be a variable.

I cannot use:

var_new = right(var_temp,14)

because the string is a different length everytime.
I just dont know this function. please help :D

Mario C

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

SPA 07-21-2003 11:24 PM

Re: trimming a variable.
 
Use the mid function in vbscript
Mid(string, start[, length])

var_string = mid(var_temp, 5)

If you know the length of how much you need to extract after the 4th
character, you can specify that too

HTH

SPA

"mario c" <philo_surfer_1981@yahoo.com> wrote in message
news:#yLqBu9TDHA.1740@TK2MSFTNGP12.phx.gbl...
>
> I need to trim a variable to have everything after 4 chars in a string.
>
> IE:
>
> var_temp = 200:16:1234567890
>
> i want everything after 200: to be a variable.
>
> I cannot use:
>
> var_new = right(var_temp,14)
>
> because the string is a different length everytime.
> I just dont know this function. please help :D
>
> Mario C
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!




mario c 07-21-2003 11:37 PM

Re: trimming a variable.
 

Thanks that worked!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT. The time now is 08:16 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57