|
|
|
Click here to copy the following block | Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As _ Any, pSrc As Any, ByVal ByteLen As Long)
Function ReplaceChar(ByVal strExpression As String, ByVal findChar As String, _ ByVal replChar As String) As String Dim arrByte() As Byte, lngUB As Long, lngLoop As Long Dim bytFind As Byte, bytReplace As Byte bytFind = Asc(findChar) bytReplace = Asc(replChar)
lngUB = LenB(strExpression) ReDim arrByte(lngUB - 1) As Byte CopyMemory arrByte(0), ByVal StrPtr(strExpression), lngUB For lngLoop = 0 To lngUB - 1 Step 2 If arrByte(lngLoop) = bytFind Then arrByte(lngLoop) = bytReplace Next ReplaceChar = Space$(lngUB \ 2) CopyMemory ByVal StrPtr(ReplaceChar), arrByte(0), lngUB End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
 |

|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|