Table of Contents

TTMSFNCGraphics.ApplyHilight Method

Wraps occurrences of AHilight inside AText with the given HTML tag to enable visual highlight rendering.

API unit family: TMSFNCGraphics Declaring type: TTMSFNCGraphics

Syntax

class function ApplyHilight(AText, AHilight, ATag: string; ADoCase: Boolean): string;

Parameters

Name Description
AText Source text in which occurrences are wrapped.
AHilight Substring to search for and wrap.
ATag HTML tag name used to wrap matched text, for example b or mark.
ADoCase When True, the search is case-sensitive. Default is False.

Returns

A copy of AText with all occurrences of AHilight wrapped in <ATag>…</ATag>.