Adds a category method for retrieving the character index of an attachment within an attributed string.