highlight

Highlights the string between matchStart and matchEnd in matchTo with color.

  1. string highlight(AnsiColor color, string matchTo, string matchOf)
  2. string highlight(AnsiColor color, string matchTo, size_t matchStart, size_t matchEnd)
    static pure
    string
    highlight
    (,
    string matchTo
    ,
    size_t matchStart
    ,
    size_t matchEnd
    )

Parameters

color AnsiColor

The color to highlight using.

matchTo string

The string being highlighted.

matchStart size_t

The start index of the string to highlight.

matchEnd size_t

The end index of the string to highlight.

Return Value

Type: string

matchTo with the color and reset inserted as to highlight the specified string.

Meta