|
1 members (Russ),
10,950
guests, and
1,516
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
S |
M |
T |
W |
T |
F |
S |
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
This is another custom island. This one could be used for ads. This spot is one of the best places for ads on your site to be placed. This can be enabled/disabled on a per forum basis.
|
|
|
|
Joined: Dec 1999
Posts: 30,868
Master Elite Member
|
Public Function SArr_PurgeDups(SArray() As String, CaseSen As Boolean) As String()
'Function
' Removes all duplicate elements from a String Array and returns the result.
' If the specified Array is Empty, returns an Empty Array.
'Parameters
' SArray (String()) = The String Array to make unique.
' CaseSen (Boolean) = If True, the comparison is case-sensitive.
' If False, the comparison is not case-sensitive.
' In this case, if MyString is found in SArray without regard to case, function returns True.
'Version History
' 1.0 4/1/2006 7:39am Tested by Russ Tanner on VB6 Win2000
'---
'Initiate variables
Dim R() As String 'return value
Dim i As Long 'loop counter
'Trap: Specified Array is Empty, return an Empty Array
If IsEmptyArray(SArray) Then
SArr_PurgeDups = R
Exit Function
End If
'Loop through all elements of the specified array and add non-duplicates to the return buffer...
For i = LBound(SArray) To UBound(SArray)
'The current source element is not in the output Array, add it now
If Not SArray_StrExists(R, SArray(i), CaseSen) Then
ReDim Preserve R(ElementCount(R))
R(UBound(R)) = SArray(i)
End If
Next i
'Return the result
SArr_PurgeDups = R
End Function
|
|
|
|
|