\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Index}[2025-07-09]

\NewDocumentCommand{\idx}{m}{\StrSubstitute{#1}{!}{ }\index{#1}}