swift: how can I delete a specific character?
<p>a string such as <code>!   !! yuahl! !</code> , I want delete <code>!</code> and  <code></code>, when I code like this </p>

<pre><code>for index in InputName.characters.indices {
    if String(InputName[index]) == "" || InputName.substringToIndex(index) == "!" {
        InputName.removeAtIndex(index)
    }
}
</code></pre>

<p>have this error " fatal error: subscript: subRange extends past String end ", how should I do? THX :D </p>