Link to home
Start Free TrialLog in
Avatar of praveenuni
praveenuni

asked on

Check string

Hello

How can I check a string if it starts with http://.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of SteveGTR
SteveGTR
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Just another way, a little more flexible (although the best solution for this particular case is the one SteveGTR mentioned ;)  ):

if str.Substring(0,7) = "http://" then...

The "0" is the starting index, 7 is the length of the substring.

greetings