Results 1 to 4 of 4

Thread: [RESOLVED] How to add characters to the beginning of a string

  1. #1

    Thread Starter
    Hyperactive Member BrianPaul's Avatar
    Join Date
    Aug 2007
    Posts
    294

    Resolved [RESOLVED] How to add characters to the beginning of a string

    I have a string variable that I would like to add 2 characters to the left side of the string. For example...

    strServerName = myserver and I would like to change it to \\myserver.

    What would be the best way to do this?
    Thanks!

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: How to add characters to the beginning of a string

    Would this work for you?
    vb Code:
    1. strServerName = "\\" & myserver
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

  4. #4

    Thread Starter
    Hyperactive Member BrianPaul's Avatar
    Join Date
    Aug 2007
    Posts
    294

    Re: How to add characters to the beginning of a string

    Of course... strServerName = "\\" & strServerName

    I must not be thinking right today
    Thanks for the help!

Posting Permissions

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



Click Here to Expand Forum to Full Width