FindDuplicateStrings

Finds duplicates in an array of strings.

Syntax

Rhino.FindDuplicateStrings (arrStrings [, blnCaseSensitive])

Parameters

arrStrings

Required.  Array.  An array of strings.

dblTolerance

Optional.  Boolean.  Use case sensitivity when searching.  The default is to search with case sensitivity (True).

Returns

Array

An array of one or more sets, or arrays, of indices that identify the locations of the duplicate strings if successful.

Null

If not successful or on error.

Example

Dim arrStrings, arrResults, arrSet, i, nIndex

arrStrings = Array("Curve", "Surface", "Mesh", "Point", "Surface", "Curve", "Curve")

arrResults = Rhino.FindDuplicateStrings(arrStrings, False)

If IsArray(arrResults) Then

  Call Rhino.Print("Set Count = " & CStr(UBound(arrResults) + 1))

  For i = 0 to UBound(arrResults)

    arrSet = arrResults(i)

    Call Rhino.Print("Set " & CStr(i+1))

    For Each nIndex in arrSet

      Call Rhino.Print("  Index " & CStr(nIndex) & " = " & arrStrings(nIndex))

    Next

  Next

End If

Also See

FindDuplicateNumbers

FindDuplicatePoints