Description Usage Arguments Details Value Examples
Add a prefix and a suffix to all the substrings that are different between a vector of source strings, and a target string.
1 |
source |
[character] A vector of strings to be highlighted. |
target |
[character] A string to which |
affixes |
[character] A vector of two strings: the first to be prepended to highlighted bits, and the second to be appended to them. |
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.
[character] The highlighted strings.
1 | cat (soundcorrs:::highlight (c("kitten","mitten"), "sitting", c("\u001b[31m","\u001b[0m")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.