Professional Web Applications Themes

trimming a variable. - ASP

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 [url]http://www.developersdex.com[/url] *** Don't just participate in USENET...get rewarded for it!...

  1. #1

    Default 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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    mario c Guest

  2. #2

    Default 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> wrote in message
    news:#yLqBu9TDHA.1740TK2MSFTNGP12.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 [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    SPA Guest

  3. #3

    Default Re: trimming a variable.


    Thanks that worked!



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    mario c Guest

Similar Threads

  1. trimming a string
    By coolidge in forum Coldfusion - Getting Started
    Replies: 6
    Last Post: September 29th, 04:17 PM
  2. trimming a string either side of a keyword
    By ceaseanddesist in forum Dreamweaver AppDev
    Replies: 4
    Last Post: May 31st, 08:16 AM
  3. trimming arcs/ellipses
    By Tonybob21 in forum Macromedia Freehand
    Replies: 3
    Last Post: July 10th, 05:18 PM
  4. trimming a file but got error?
    By yls177 in forum Linux / Unix Administration
    Replies: 5
    Last Post: April 30th, 02:59 PM
  5. Trimming Whitespace
    By Sean Levesley in forum Macromedia Director Basics
    Replies: 3
    Last Post: August 22nd, 10:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139