JS Utils Kit - v0.5.1
    Preparing search index...

    Function stripSymbols

    • Removes or replaces common symbol characters from a string.

      Parameters

      • str: string

        The input string

      • replacement: string = ''

        Optional replacement string for removed symbols.

        ""
        

      Returns string

      A new string with symbols removed or replaced.

      • Strips symbols like - _ @ ! $ % ^ & # * ( ) + = , . ; : ' " < > ? / \ | [ ] { }.
      • Keeps letters, numbers, and spaces intact.
      • By default, removes symbols (replaces with "").
      stripSymbols("hello-world!");              // "helloworld"
      stripSymbols("hello-world!", " "); // "hello world "
      stripSymbols("user_name@test", "_"); // "user_nametest"
      stripSymbols("symbols-only!!!", "*"); // "symbols-only***"