@yookue/ts-lang-utils
    Preparing search index...

    Function prependIfMissing

    • Returns a string that concat the given prefix and text

      Parameters

      • Optionaltext: null | string

        the text to check

      • Optionalprefix: string

        the prefix to prepend

      Returns undefined | null | string

      a string that concat the given prefix and text

      David Hsing

      prependIfMissing('bar', 'foo');    // 'foobar'
      prependIfMissing('foobar', 'foo'); // 'foobar'