|
-
Jul 14th, 2000, 11:45 AM
#1
Changing a string
Ok, this is the string i have...
http://www.geocities.com/jeb_malice/frame.html
and i need it to turn into this...
http://www.geocities.com/jeb_malice/
but...
The string could also be this...
http://www.geocities.com/jeb_malice/list.js
and that would have to be turned into...
http://www.geocities.com/jeb_malice/
If i didnt explain this right, let me know. If i did explain it right, try to answer!
-
Jul 14th, 2000, 11:58 AM
#2
Fanatic Member
This is my area of expertise actually. String manipulation.
Code:
Dim ip As Long
Dim strtocheck As String
strtocheck = "http://www.geocities.com/jeb_malice/frame.html"
'find the last /
ip = InStrRev(strtocheck, "/")
'get everything upto and including the last /
strtocheck = Left$(strtocheck, ip)
MsgBox strtocheck
Iain, thats with an i by the way!
-
Jul 14th, 2000, 12:17 PM
#3
Fanatic Member
I'd just like to add to that...
[/code]
Dim ip As Long
Dim StrX As String
StrX = Text1.Text
If StrX Like "http://www.geocities.com/jeb_malice/*.*" Then
'This is just Iain's code (with my variable):
ip = InStrRev(StrX, "/")
'get everything upto and including the last /
StrX = Left$(StrX, ip)
MsgBox StrX
End If
[/code]
I'm not good at String Manipulation, but it's my best area if you see
what Slim Shady is saying.
-
Jul 14th, 2000, 12:44 PM
#4
Thanks i think i got it working now.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|