Skip to content

isAscii

isAscii(string) → boolean · String

Returns true if the string contains only ASCII characters (code points 0-127).

  • string (required): string to test
utlx
isAscii("Hello!")                        // true
isAscii("cafe\u0301")                    // false (contains accent)
{
  asciiSafe: isAscii($input.text)
}

Released under AGPL-3.0.