|
-
Sep 28th, 2011, 08:09 PM
#1
Thread Starter
Fanatic Member
Add string before a string...
So, i'm having a major brain fart...
If I wanted to add a string AFTER a string, i could do string += "whatever"...
How could I add it to BEFORE it?
-
Sep 28th, 2011, 08:22 PM
#2
Lively Member
Re: Add string before a string...
you could always try
vb Code:
originalString = newString & originalString
My car if Chevy was VB.NET
Code:
Public Class MyCar
Public Sub Camaro()
Dim Camaro As Car
Camaro = SS.Fast("Sexy")
End Sub
Public Function Fast(ByVal sexy As String ) As String
Return "SUPER" & sexy
End Function
End Class
-
Sep 28th, 2011, 08:39 PM
#3
Thread Starter
Fanatic Member
Re: Add string before a string...
i COULD do that, and I guess I should've specified more...
actually... nevermind. you gave me an idea. thanks!
-
Sep 28th, 2011, 08:41 PM
#4
Lively Member
Re: Add string before a string...
Lol please share. Is there an operatorfor what you are trying to do
My car if Chevy was VB.NET
Code:
Public Class MyCar
Public Sub Camaro()
Dim Camaro As Car
Camaro = SS.Fast("Sexy")
End Sub
Public Function Fast(ByVal sexy As String ) As String
Return "SUPER" & sexy
End Function
End Class
-
Sep 28th, 2011, 08:55 PM
#5
Re: Add string before a string...
you could use the string's insert method:
vb Code:
Dim s As String = "string"
MsgBox(s.Insert(0, "a "))
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
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
|