Add a prefix and a suffix to all the substrings that are different between a vector of source strings, and a target string.
Usage
highlight(source, target, affixes)
Arguments
source
[character] A vector of strings to be highlighted.
target
[character] A string to which source strings are to be compared.
affixes
[character] A vector of two strings: the first to be prepended to highlighted bits, and the second to be appended to them.
Value
[character] The highlighted strings.
Details
The effect is similar to Unix diff, only all the differences are highlighted in the same colour, and a "_" is inerted where characters are missing. To save on speed, the function does not check the arguments are correct, etc.