<-- Previous || Up || Next -->

Sort Order String Function
Sort Orders Class

Public Function SortOrderString( _
    Optional ByVal vCompare As Variant _
    ) As String

Produce a string which describes the sequence of each character in the specified sort order/collaring sequence.

Within the result string, the character position identifies the character whose collating sequence is described. The ASCII value of the characters identifies the position of the character within the collating sequence. The Sequence of the character with ASCII value X in the collating sequence is Asc(Mid$(Result, X + 1, 1)) where Result is the string returned by this function. For example, the sequence of "A" within the sort order is Asc(Mid$(Result, 66, 1)).
    SortOrderString(vbBinaryCompare) = Chr$(0) + Chr$(1) + ... + Chr$(255) ' #1
    SortOrderString(vbBinaryCompare) = EveryCharacter
Note: The results of example #1 has been condensed with "..." to save space.
See also:
    SortOrderMatchingCharacters Function
    SortOrderNumbers Function
vCompare: Specifies the sort order/collating sequence for which the sort order string will be prepared. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number; in the Binary collating sequence, the result matches the string produced by the EveryCharacter function.

Note: Function currently only works for characters whose ASCII value is between 0 and 255, so it does NOT support UNICODE.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.