• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Visual Basic sReplace [VB6 Src] By Scorpio

Status
Not open for further replies.

F.I.G.H.T.E.R

ϻɵĐęřåŦō&#1136
User
Joined
Mar 26, 2013
Messages
975
Reputation
0
Reaction score
15,790
Points
493
Credits
0
‎12 Years of Service‎
20%
sReplace [VB6 Src] By Scorpio

[HIDE-THANKS]

Function sReplace(sText As String, sSearch As String, sFirstString As String, sLastString As String) As String
Dim sString As String, sMidString As String
Dim sSemaphore As Boolean
Dim i As Integer

sSemaphore = False

For i = 1 To Len(sText)
sMidString = Mid(sText, i, Len(sSearch))
If sMidString = sSearch Then
If sSemaphore = False Then
sString = sFirstString & sMidString
sSemaphore = True
Else
sString = sString & sMidString & sLastString
sReplace = sReplace & sString
sSemaphore = False
End If
Else
If sSemaphore = True Then
sString = sString & sMidString
Else
sReplace = sReplace & sMidString
End If
End If
Next i
End Function​
Code:
>
[/HIDE-THANKS]




 
Status
Not open for further replies.
Back
Top