Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > trimming a variable.

Reply
Thread Tools

trimming a variable.

 
 
mario c
Guest
Posts: n/a
 
      07-21-2003

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

Mario C

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
SPA
Guest
Posts: n/a
 
      07-21-2003
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" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
>
> 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
>
> Mario C
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
mario c
Guest
Posts: n/a
 
      07-21-2003

Thanks that worked!



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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Trimming on remote Server (ISP shared) Paul ASP .Net 0 01-17-2006 11:59 PM
Help trimming URL path =?Utf-8?B?Q2hyaXM=?= ASP .Net 4 12-14-2004 06:56 PM
trimming text in a datagrid to match column length Brian Henry ASP .Net 5 10-21-2004 07:16 PM
Trimming data in dropdownlist from sqldatareader William Mild ASP .Net 2 10-23-2003 12:51 PM
Re: Trimming Blank Spaces in String Steve C. Orr, MCSD ASP .Net 1 08-09-2003 12:46 AM



Advertisments