Function isPersian

Check if string is in persian.

  • Parameters

    • str: string
    • isComplex: boolean = false

      in complex mode, we accept some specific characters which are common in Farsi text.

    • trimPattern: RegExp = ...

      Pattern of characters which you want to trim from the string e.g. "-+. ()"

    Returns boolean

    Return true if the entered string does not include other-language characters.