Public Function CharacterPositionsArray( _ ByRef raintPositions() As Integer _ , ByVal vString As Variant _ ) As Boolean
Assuming Dim aintCustom() As Integer for example CharacterPositionsArray(aintCustom(), "AaBb") = True leaves LBound(aintCustom) = 0 UBound(aintCustom) = 255 aintCustom(65) = 1 aintCustom(97) = 2 aintCustom(66) = 3 aintCustom(98) = 4 aintCustom(0) = 5 aintCustom(1) = 6 'etc.See also:
SortOrderString Function, et. al.raintPositions: Dynamic one-dimensional array of integers which will be filled with the collating sequence for each character. The value of element X will be the collating sequence for the character with ASCII value X.
vString: String containing the characters which define the collating sequence. The position of each character within this string is the position of the character with that ASCII value within the collating sequence. vString defaults to an empty string is it is Null or cannot be fixed up to a String.
Note: Function currently only works for characters whose ASCII value is between 0 and 255, so it does NOT support UNICODE.
Note: Function assigns collating sequences to those characters that did not appear within the string vString. Each of those characters will be added to the end of the collating sequence. They will be added in order by their ASCII value.
Function returns True upon success.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.