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

Dictionary Order Function
String Words Class

Public Function DictionaryOrder( _
      ByVal vValue As Variant _
    , Optional ByVal vRotateWords As Variant _
    , Optional ByVal vSeparator As Variant _
    ) As Variant

Return a string representing the dictionary order of the string vValue.
If the string begins with any of the words in vRotateWords, those words are moved to the end of the string.

Top20: This function is among our "top-twenty" most useful.
Examples:
    DictionaryOrder("Entisoft Tools") = "Entisoft Tools"
    DictionaryOrder("The Entisoft Tools Library") = "Entisoft Tools Library, The"
See also:
    LastName1stTo1stName1st Function
    SortVariantVector Function
vValue: String containing the phrase which should be converted to its dictionary order. Function returns Null if vValue is Null or cannot be fixed up to a String.

vRotateWords: String containing a list of words which should be moved to the end of the string if they appear at the beginning of it. vRotateWords defaults to the string "A AN THE" if it is missing or Null or cannot be fixed up to a String.
vSeparator: String which separates each of the words within string vRotateWords. vSeparator defaults to a space character if it is missing or Null or cannot be fixed up to a String.
Note: Function uses Binary comparisons to locate the separator string vSeparator within string vValue.

Note: Function uses Text comparisons to locate the "rotate" words at the beginning of string vValue.

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