Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "string/remove-punctuation/docs/types/index.d"

Index

Functions

Functions

Export assignment removePunctuation

  • removePunctuation(str: string): string
  • Removes punctuation characters from a string.

    Parameters

    • str: string

      input string

    Returns string

    output string

    Example

    var str = 'Sun Tzu said: "A leader leads by example not by force."';
    var out = removePunctuation( str );
    // returns 'Sun Tzu said A leader leads by example not by force'

    Example

    var str = 'Double, double, toil and trouble; Fire burn, and cauldron bubble!';
    var out = removePunctuation( str );
    // returns 'Double double toil and trouble Fire burn and cauldron bubble'

    Example

    var str = 'This module removes these characters: `{}[]:,!/<>().;~|?\'"';
    var out = removePunctuation( str );
    // returns 'This module removes these characters '