Simple dumb string question
I have a string that will always be 75 spaces then a url, i.e.
"(insert 75 spaces here)www.hotmail.com"
My question is how can i take those spaces out without refuring to the url, since it will be different everytime and may or may not have http:// or www. ?
Thanks in Advance.
Ele
Re: Simple dumb string question
Hi
How about something like :
'
' sUrl is your string with 75 spaces then a Url
'
Dim sTemp as string
If len(sUrl) > 75 then
sTemp = Right$(sUrl, len(sUrl) - 75)
sUrl = sTemp
End If
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
Re: Simple dumb string question
Hi!
I think the solution given by Chris Eastwood is ok, still one more solution
to this ,is to use ltrim(sting name), which will clear all the left
whitespaces swithout disturbing the url.
thanks.
manmath
Re: Simple dumb string question
If your trying to strip all of the spaces off of the left side of a string try the Ltrim$() function.
Re: Simple dumb string question
Wont Just Simple pain Trim(Str) work which can trim all the white spaces trailing and leading as well.