Function appendIfMissingIgnoreCase

  • Returns a string that concat the given text and suffix, case-insensitive

    Parameters

    • Optionaltext: null | string

      the text to check

    • Optionalsuffix: null | string

      the suffix to append

    Returns string | undefined | null

    a string that concat the given text and suffix, case-insensitive

    appendIfMissingIgnoreCase('foo', 'bar');    // 'foobar'
    appendIfMissingIgnoreCase('foobar', 'BAR'); // 'foobar'