Function elemOfStr

  • Checks if a substring is in a string.

    Parameters

    • haystack: string

      The string to search in

    Returns ((needle) => boolean)

    A function that takes a needle (substring) and returns true if it's in the haystack

      • (needle): boolean
      • Parameters

        • needle: string

        Returns boolean

    Example

    elemOfStr('abc')('a') // true
    elemOfStr('abc')('ab') // true
    elemOfStr('abc')('d') // false
    opt('ab').exists(elemOfStr('abc')) // true

    See

Generated using TypeDoc