dot-insert_highlight: Insert Highlight in Text

.insert_highlightR 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.


textpress documentation built on Oct. 14, 2024, 5:08 p.m.