[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

manipulating text strings

Ok, this again is a simple question ... but for some reason I have trouble keeping this trivial information in my brain.

I'm writing an app that picks a url from a list.

for the winsock to call the url (in my code anyway) I need to give the winsock the remote host for that url.

I need the simple code that removes the first five letters of the string.

example:

if theURL = "http://www.fibdev.com"

I want to make theURL = "www.fibdev.com"
0
fibdev
Asked:
fibdev
  • 3
  • 2
1 Solution
 
AnswerTheManCommented:
dim Temp as string
dim L as long
Temp="http://www.fibdev.com"
L=len(temp)
Temp=Right(Temp,L-5)

'' Temp is now :"www.fibdev.com"

 

0
 
AnswerTheManCommented:
correction :
the line :  >>Temp=Right(Temp,L-5)
should be : >>Temp=Right(Temp,L-7)

0
 
tureCommented:
fibdev,

Something like this...

Dim theURL As String
theURL = "http://www.fibdev.com
If Left(theURL,7)="http://" Then
  theURL = Mid(theURL, 8, Len(theURL)-8)
End If

Ture Magnusson
Karlsrad, Sweden
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
fibdevAuthor Commented:
Thanks ATM,

You've come through for me yet again ..
0
 
fibdevAuthor Commented:
ATM,

for some reason my winsock code is giving me trouble ...

can I email you for some help.  I don't want to post my code out there for the world to see?
0
 
AnswerTheManCommented:
Sub_Main@Hotmail.com

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now