Loading problem…
Browsers, document editors, and note-taking apps all let users search within content and visually highlight matching text. Think Ctrl+F / Cmd+F, but for a plain string. For this problem, implement a small string-only version of that behavior.
Implement textSearch(content, query), which finds every case-insensitive occurrence of query inside content and returns a string where each match is wrapped in <b>...</b>.
query inside contentcontent<b> and </b>query is empty, return the original content without adding <b> tagsquery as plain text, not a regular expressioncontent; this problem is about string transformation only<b> and </b> wrappers<b> wrapper