Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove First Character of String 1

Status
Not open for further replies.

Mike555

Technical User
Feb 21, 2003
1,200
US
I have a string named Value which contains user input. I'm simply trying to check if $ is the utmost-left (first) character within the string, and if so, remove it from this string. My code is below, but this isn't working.
Code:
If Value.Substring(0, 1) = "$" Then
            Value = Mid(Value, Len(Value) - 1)
End If
Could someone please suggest how I could accomplish this? Thanks.

--
Regards,
Mike
 
Code:
if Value.Startswith("$") then Value=Value.Substring(1)

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top