Public Function CombineOverlappingWords( _ ByVal vLineOne As Variant _ , ByVal vLineTwo As Variant _ ) As Variant
CombineOverlappingWords("THIS IS A", "A STRING") = "THIS IS A STRING" CombineOverlappingWords("THIS IS A", "IS A STRING") = "THIS IS A STRING" CombineOverlappingWords("THIS IS", "A TEST") = "THIS IS A TEST" CombineOverlappingWords("THIS IS A", "A STRING") = "THIS IS A STRING" ' #4See also:
SortWords Function UniqueCharacters Function UniqueFileLines FunctionFunction returns Null if both vLineOne and vLineTwo are Null.
vLineOne: The left portion of the phrase whose right side is to be checked against the left side of vLineTwo. vLineOne defaults to an empty string if it is Null or cannot be fixed up to a String.
vLineTwo: The right portion of the phrase whose left side is to be checked against the left side of vLineOne. vLineTwo defaults to an empty string if it is Null or cannot be fixed up to a String.
Note: The combined phrases are separated by a single space, even though all other spaces in the non-overlapping portions of the two phrases are preserved as in example #4.
Note: Function uses the built-in character classification routines to determine which characters represent spaces.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.