Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2003
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow displaying html from a string

    hello, i have the html of a page as a string and

    Dim sFileExt
    sFileExt = strRetval
    sFileExt = Left(strRetval, 3667)
    Response.Write sFileExt

    display 3667 from the left side of the string, which doesn't fit the situation any more. How can i remove the first 3200 characters from the begining of the string instead.

    Thanks in advanced!

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,062
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Try This
    Code:
    Dim sFileExt, i, x
    i = Len(strRetval)  'the length of the string
    REM  make sure the string is over 3200 characters to prevent an error
    If i > 3200 Then x = i-3200   
    sFileExt = Mid(strRetval, 3200, x) 'will return all the string after the 3200th character  
    Response.Write sFileExt
    Last edited by miranda; 01-24-2005 at 09:36 PM.

  • #3
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    removing starting characters from the string can be done like this:

    Code:
    strSomething = "oh! hello"
    strSomething = Right(strSomething, Len(strSomething)-4)
    which should select everything but the first 4 characters, returning "hello"
    Last edited by ghell; 01-25-2005 at 12:21 PM.


  •  

    Posting Permissions

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