|
|
|
Click here to copy the following block | Public Function PermuteString(ByVal Ztring As String, Optional Base As String = _ "") As String Dim TmpStrArray() As String, I As Long If InStr(1, Ztring, " ", vbTextCompare) = 0 Then PermuteString = Base & " " & Ztring & vbCrLf Exit Function End If TmpStrArray = Split(Ztring, " ", , vbTextCompare) If Base = "" Then For I = LBound(TmpStrArray) To UBound(TmpStrArray) PermuteString = PermuteString & PermuteString(ReturnAllBut _ (TmpStrArray, I), TmpStrArray(I)) Next Else For I = LBound(TmpStrArray) To UBound(TmpStrArray) PermuteString = PermuteString & " " & PermuteString(ReturnAllBut _ (TmpStrArray, I), Base & " " & TmpStrArray(I)) Next End If End Function
Public Function ReturnAllBut(ByRef Arrai() As String, But As Long) As String Dim I As Long For I = LBound(Arrai) To UBound(Arrai) If I <> But Then ReturnAllBut = ReturnAllBut & Arrai(I) & " " End If Next ReturnAllBut = RTrim(ReturnAllBut) 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 ) |
|
|