import i from "react";
function g(s, o) {
  if (!o || !o.trim()) return s;
  const h = o.toLowerCase(), r = s.toLowerCase(), e = [];
  let n = 0, t = r.indexOf(h);
  for (; t !== -1; ) {
    t > n && e.push(s.substring(n, t));
    const c = s.substring(t, t + o.length);
    e.push(i.createElement("strong", { key: `match-${t}` }, c)), n = t + o.length, t = r.indexOf(h, n);
  }
  return n < s.length && e.push(s.substring(n)), e;
}
export {
  g as default
};
//# sourceMappingURL=highlightMatch.js.map
