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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2003
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation set variable to first 5 characters of string

    Hi, i have have a string that i would like to set var s to the first 5 characters of
    How is this accomplished? Thanks

  • #2
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    You could use the left().

    I totally how to code in ASP since its been about 2 years w/PHP but something like this.

    <%
    dim s
    s = left(Whatever string you have,5)
    %>

    You can use this as a reference.
    http://www.w3schools.com/vbscript/func_left.asp
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.


  •  

    Posting Permissions

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