Function elemOfStrIn

  • Checks if the string value inside this Opt is a substring of the given string.

    Parameters

    • haystack: string

      The string to search in

    Returns ((needle) => Opt<boolean>)

    A function that takes an Opt and returns an Opt

      • (needle): Opt<boolean>
      • Parameters

        • needle: Opt<string>

        Returns Opt<boolean>

    Example

    elemOfStrIn('abc')(opt('a')) // Some(true)
    elemOfStrIn('abc')(opt('d')) // Some(false)
    elemOfStrIn('abc')(none) // None

    See

    Opt.elemOfStrIn

Generated using TypeDoc