.insert_highlight {textpress} | R Documentation |
Insert Highlight in Text
Description
Inserts highlight markers around a specified substring in a text string. Used to visually emphasize search query matches in the text.
Usage
.insert_highlight(text, start, end, highlight)
Arguments
text |
The text string where highlighting is to be applied. |
start |
The starting position of the substring to highlight. |
end |
The ending position of the substring to highlight. |
highlight |
A character vector of length two specifying the opening and closing highlight markers. |
Value
A character string with the specified substring highlighted.
[Package textpress version 1.0.0 Index]