Checks if c is in
[^\p{space}\p{gc=Control}\p{gc=Surrogate}\p{gc=Unassigned}]
with space=\p{Whitespace} and Control=Cc.
Implements UCHAR_POSIX_GRAPH.
@hide draft / provisional / internal are hidden on Android
558655
private static final boolean isgraphPOSIX(int c) {
        /* \p{space}\p{gc=Control} == \p{gc=Z}\p{Control} */
        /* comparing ==0 returns FALSE for the categories mentioned */
        return (getMask(UCharacter.getType(c))&
                (GC_CC_MASK|GC_CS_MASK|GC_CN_MASK|GC_Z_MASK))
               ==0;
    }
149590
function checkSpacingForForOfStatement(node) {
            if (node.await) {
                checkSpacingBefore(sourceCode.getFirstToken(node, 0));
                checkSpacingAfter(sourceCode.getFirstToken(node, 1));
            } else {
                checkSpacingAroundFirstToken(node);
            }
            checkSpacingAround(sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken));
        }
160214
private static boolean isNamespacePlaceholder(Node n) {
    if (!n.getBooleanProp(Node.IS_NAMESPACE)) {
      return false;
    }

    Node value = null;
    if (n.isExprResult()) {
      Node assign = n.getFirstChild();
      value = assign.getLastChild();
    } else if (n.isVar()) {
      Node name = n.getFirstChild();
      value = name.getFirstChild();
    }

    if (value == null) {
      return false;
    }
    if (value.isCast()) {
      // There may be a cast to unknown type wrapped around the value.
      value = value.getOnlyChild();
    }
    return value.isObjectLit() && !value.hasChildren();
  }
429942
function() {
            var pos = this;
            if (!pos.prepopulatedChar) {
                var node = pos.node, offset = pos.offset;
                log.debug("prepopulateChar " + pos.inspect());
                var visibleChar = "", charType = EMPTY;
                var finalizedChar = false;
                if (offset > 0) {
                    if (node.nodeType == 3) {
                        var text = node.data;
                        var textChar = text.charAt(offset - 1);
                        log.debug("Got char '" + textChar + "' in data '" + text + "'");

                        var nodeInfo = pos.nodeWrapper.getTextNodeInfo();
                        var spaceRegex = nodeInfo.spaceRegex;
                        if (nodeInfo.collapseSpaces) {
                            if (spaceRegex.test(textChar)) {
                                // "If the character at position is from set, append a single space (U+0020) to newdata and advance
                                // position until the character at position is not from set."

                                // We also need to check for the case where we're in a pre-line and we have a space preceding a
                                // line break, because such spaces are collapsed in some browsers
                                if (offset > 1 && spaceRegex.test(text.charAt(offset - 2))) {
                                    log.debug("Character is a collapsible space preceded by another collapsible space, therefore empty");
                                } else if (nodeInfo.preLine && text.charAt(offset) === "\n") {
                                    log.debug("Character is a collapsible space which is followed by a line break in a pre-line element, skipping");
                                    visibleChar = " ";
                                    charType = PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK;
                                } else {
                                    log.debug("Character is a collapsible space not preceded by another collapsible space, including but will need to check for whether it precedes a <br> or end of a block");
                                    visibleChar = " ";
                                    //pos.checkForFollowingLineBreak = true;
                                    charType = COLLAPSIBLE_SPACE;
                                }
                            } else {
                                log.debug("Character is not a space, adding");
                                visibleChar = textChar;
                                charType = NON_SPACE;
                                finalizedChar = true;
                            }
                        } else {
                            log.debug("Spaces are not collapsible, so adding");
                            visibleChar = textChar;
                            charType = UNCOLLAPSIBLE_SPACE;
                            finalizedChar = true;
                        }
                    } else {
                        var nodePassed = node.childNodes[offset - 1];
                        if (nodePassed && nodePassed.nodeType == 1 && !isCollapsedNode(nodePassed)) {
                            if (nodePassed.tagName.toLowerCase() == "br") {
                                log.debug("Node is br");
                                visibleChar = "\n";
                                pos.isBr = true;
                                charType = COLLAPSIBLE_SPACE;
                                finalizedChar = false;
                            } else {
                                log.debug("Unresolved trailing space for node " + dom.inspectNode(nodePassed) + ". Will resolve this later if necessary.");
                                pos.checkForTrailingSpace = true;
                            }
                        }

                        // Check the leading space of the next node for the case when a block element follows an inline
                        // element or text node. In that case, there is an implied line break between the two nodes.
                        if (!visibleChar) {
                            var nextNode = node.childNodes[offset];
                            if (nextNode && nextNode.nodeType == 1 && !isCollapsedNode(nextNode)) {
                                log.debug("Unresolved leading space for node " + dom.inspectNode(nextNode) + ". Will resolve this later if necessary.");
                                pos.checkForLeadingSpace = true;
                            }
                        }
                    }
                }

                pos.prepopulatedChar = true;
                pos.character = visibleChar;
                pos.characterType = charType;
                pos.isCharInvariant = finalizedChar;
            }
        }
603660
@VisibleForTesting
	static boolean isPghp(String line) {
		if (line == null)
			return false;
		else
			// return Pattern.matches("^(\\\\.*\\\\)?\\$PGHP.*$", line);
			return pghpPattern.matcher(line).matches();
	}
302857
private static boolean isAlpha(int c) {
        return (c >= '0' && c <= '9') ||
               (c >= 'A' && c <= 'Z') ||
               (c == ' ') ||
               (c == '$') ||
               (c == '%') ||
               (c == '*') ||
               (c == '+') ||
               (c == '-') ||
               (c == '.') ||
               (c == '/') ||
               (c == ':');
    }
1212404
public boolean isInMatchSpace()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "isInMatchSpace");
            SibTr.exit(tc, "isInMatchSpace", Boolean.valueOf(isInMatchSpace));
        }

        return isInMatchSpace;
    }
1302742
public static final void verify(byte[] Y, byte[] v, byte[] h, byte[] P) {
		/* Y = v abs(P) + h G  */
		byte[] d=new byte[32];
	    long10[] 
	        p=new long10[]{new long10(),new long10()},
	    	s=new long10[]{new long10(),new long10()},
		    yx=new long10[]{new long10(),new long10(),new long10()},
		    yz=new long10[]{new long10(),new long10(),new long10()},
		    t1=new long10[]{new long10(),new long10(),new long10()},
		    t2=new long10[]{new long10(),new long10(),new long10()};
		
		int vi = 0, hi = 0, di = 0, nvh=0, i, j, k;

		/* set p[0] to G and p[1] to P  */

		set(p[0], 9);
		unpack(p[1], P);

		/* set s[0] to P+G and s[1] to P-G  */

		/* s[0] = (Py^2 + Gy^2 - 2 Py Gy)/(Px - Gx)^2 - Px - Gx - 486662  */
		/* s[1] = (Py^2 + Gy^2 + 2 Py Gy)/(Px - Gx)^2 - Px - Gx - 486662  */

		x_to_y2(t1[0], t2[0], p[1]);	/* t2[0] = Py^2  */
		sqrt(t1[0], t2[0]);	/* t1[0] = Py or -Py  */
		j = is_negative(t1[0]);		/*      ... check which  */
		t2[0]._0 += 39420360;		/* t2[0] = Py^2 + Gy^2  */
		mul(t2[1], BASE_2Y, t1[0]);/* t2[1] = 2 Py Gy or -2 Py Gy  */
		sub(t1[j], t2[0], t2[1]);	/* t1[0] = Py^2 + Gy^2 - 2 Py Gy  */
		add(t1[1-j], t2[0], t2[1]);/* t1[1] = Py^2 + Gy^2 + 2 Py Gy  */
		cpy(t2[0], p[1]);		/* t2[0] = Px  */
		t2[0]._0 -= 9;			/* t2[0] = Px - Gx  */
		sqr(t2[1], t2[0]);		/* t2[1] = (Px - Gx)^2  */
		recip(t2[0], t2[1], 0);	/* t2[0] = 1/(Px - Gx)^2  */
		mul(s[0], t1[0], t2[0]);	/* s[0] = t1[0]/(Px - Gx)^2  */
		sub(s[0], s[0], p[1]);	/* s[0] = t1[0]/(Px - Gx)^2 - Px  */
		s[0]._0 -= 9 + 486662;		/* s[0] = X(P+G)  */
		mul(s[1], t1[1], t2[0]);	/* s[1] = t1[1]/(Px - Gx)^2  */
		sub(s[1], s[1], p[1]);	/* s[1] = t1[1]/(Px - Gx)^2 - Px  */
		s[1]._0 -= 9 + 486662;		/* s[1] = X(P-G)  */
		mul_small(s[0], s[0], 1);	/* reduce s[0] */
		mul_small(s[1], s[1], 1);	/* reduce s[1] */


		/* prepare the chain  */
		for (i = 0; i < 32; i++) {
			vi = (vi >> 8) ^ (v[i] & 0xFF) ^ ((v[i] & 0xFF) << 1);
			hi = (hi >> 8) ^ (h[i] & 0xFF) ^ ((h[i] & 0xFF) << 1);
			nvh = ~(vi ^ hi);
			di = (nvh & (di & 0x80) >> 7) ^ vi;
			di ^= nvh & (di & 0x01) << 1;
			di ^= nvh & (di & 0x02) << 1;
			di ^= nvh & (di & 0x04) << 1;
			di ^= nvh & (di & 0x08) << 1;
			di ^= nvh & (di & 0x10) << 1;
			di ^= nvh & (di & 0x20) << 1;
			di ^= nvh & (di & 0x40) << 1;
			d[i] = (byte)di;
		}

		di = ((nvh & (di & 0x80) << 1) ^ vi) >> 8;

		/* initialize state */
		set(yx[0], 1);
		cpy(yx[1], p[di]);
		cpy(yx[2], s[0]);
		set(yz[0], 0);
		set(yz[1], 1);
		set(yz[2], 1);

		/* y[0] is (even)P + (even)G
		 * y[1] is (even)P + (odd)G  if current d-bit is 0
		 * y[1] is (odd)P + (even)G  if current d-bit is 1
		 * y[2] is (odd)P + (odd)G
		 */

		vi = 0;
		hi = 0;

		/* and go for it! */
		for (i = 32; i--!=0; ) {
			vi = (vi << 8) | (v[i] & 0xFF);
			hi = (hi << 8) | (h[i] & 0xFF);
			di = (di << 8) | (d[i] & 0xFF);

			for (j = 8; j--!=0; ) {
				mont_prep(t1[0], t2[0], yx[0], yz[0]);
				mont_prep(t1[1], t2[1], yx[1], yz[1]);
				mont_prep(t1[2], t2[2], yx[2], yz[2]);

				k = ((vi ^ vi >> 1) >> j & 1)
				  + ((hi ^ hi >> 1) >> j & 1);
				mont_dbl(yx[2], yz[2], t1[k], t2[k], yx[0], yz[0]);

				k = (di >> j & 2) ^ ((di >> j & 1) << 1);
				mont_add(t1[1], t2[1], t1[k], t2[k], yx[1], yz[1],
						p[di >> j & 1]);

				mont_add(t1[2], t2[2], t1[0], t2[0], yx[2], yz[2],
						s[((vi ^ hi) >> j & 2) >> 1]);
			}
		}

		k = (vi & 1) + (hi & 1);
		recip(t1[0], yz[k], 0);
		mul(t1[1], yx[k], t1[0]);

		pack(t1[1], Y);
	}
124649
private boolean handleControl(Char c) {
        if (c instanceof Control) {
            if (c.equals(Control.DELETE)) {
                if (after.length() > 0) {
                    after = after.substring(1);
                }
            } else if (c.equals(Control.LEFT)) {
                if (before.length() > 0) {
                    after = "" + before.charAt(before.length() - 1) + after;
                    before = before.substring(0, before.length() - 1);
                }
            } else if (c.equals(Control.HOME)) {
                after = before + after;
                before = "";
            } else if (c.equals(Control.CTRL_LEFT)) {
                int cut = cutWordBefore();
                if (cut > 0) {
                    after = before.substring(cut) + after;
                    before = before.substring(0, cut);
                } else {
                    after = before + after;
                    before = "";
                }
            } else if (c.equals(Control.RIGHT)) {
                if (after.length() > 0) {
                    before = before + after.charAt(0);
                    after = after.substring(1);
                }
            } else if (c.equals(Control.END)) {
                before = before + after;
                after = "";
            } else if (c.equals(Control.CTRL_RIGHT)) {
                int cut = cutWordAfter();
                if (cut > 0) {
                    before = before + after.substring(0, cut);
                    after = after.substring(cut);
                } else {
                    before = before + after;
                    after = "";
                }
            } else if (c.equals(ALT_W)) {
                // delete word before the cursor.
                int cut = cutWordBefore();
                if (cut > 0) {
                    before = before.substring(0, cut);
                } else {
                    before = "";
                }
            } else if (c.equals(ALT_D)) {
                // delete word after the cursor.
                int cut = cutWordAfter();
                if (cut > 0) {
                    after = after.substring(cut);
                } else {
                    after = "";
                }
            } else if (c.equals(ALT_K)) {
                // delete everything after the cursor.
                after = "";
            } else if (c.equals(ALT_U)) {
                // delete everything before the cursor.
                before = "";
            } else {
                printAbove("Invalid control: " + c.asString());
                return true;
            }
            printInputLine();
            return true;
        }
        return false;
    }
863233
public static boolean isWhitespace(final char pCharAt) {
      return (pCharAt == '\u0009' || pCharAt == '\n' || pCharAt == '\u000B'
           || pCharAt == '\u000C' || pCharAt == '\r' || pCharAt == '\u001C'
           || pCharAt == '\u001D' || pCharAt == '\u001E' || pCharAt == '\u001F'
           || pCharAt == '\u0020' || pCharAt == '\u1680' || pCharAt == '\u180E'
           || pCharAt == '\u2000' || pCharAt == '\u2001' || pCharAt == '\u2002'
           || pCharAt == '\u2003' || pCharAt == '\u2004' || pCharAt == '\u2005'
           || pCharAt == '\u2006' || pCharAt == '\u2008' || pCharAt == '\u2009'
           || pCharAt == '\u200A' || pCharAt == '\u2028' || pCharAt == '\u2029'
           || pCharAt == '\u205F' || pCharAt == '\u3000');
    }
405047
public static boolean isGraphic(CharSequence str) {
        final int len = str.length();
        for (int i=0; i<len; i++) {
            int gc = Character.getType(str.charAt(i));
            if (gc != Character.CONTROL
                    && gc != Character.FORMAT
                    && gc != Character.SURROGATE
                    && gc != Character.UNASSIGNED
                    && gc != Character.LINE_SEPARATOR
                    && gc != Character.PARAGRAPH_SEPARATOR
                    && gc != Character.SPACE_SEPARATOR) {
                return true;
            }
        }
        return false;
    }
181961
static long unassignedPrimaryFromCodePoint(int c) {
        // Create a gap before U+0000. Use c=-1 for [first unassigned].
        ++c;
        // Fourth byte: 18 values, every 14th byte value (gap of 13).
        long primary = 2 + (c % 18) * 14;
        c /= 18;
        // Third byte: 254 values.
        primary |= (2 + (c % 254)) << 8;
        c /= 254;
        // Second byte: 251 values 04..FE excluding the primary compression bytes.
        primary |= (4 + (c % 251)) << 16;
        // One lead byte covers all code points (c < 0x1182B4 = 1*251*254*18).
        return primary | ((long)UNASSIGNED_IMPLICIT_BYTE << 24);
    }
461597
@Override
	public boolean isWhitespace() {
		if (type != TEXT && type != IGNORABLE_WHITESPACE && type != CDSECT) {
			throw new KriptonRuntimeException(ILLEGAL_TYPE, true, this.getLineNumber(), this.getColumnNumber(), getPositionDescription(), null);
		}
		return isWhitespace;
	}
1369017
function checkSpaces({
  string,
  globalIndex,
  startIndex,
  endIndex,
  node,
  result
}) {
  const symbol = string.substring(startIndex, endIndex + 1);

  const beforeOk =
    (string[startIndex - 1] === " " && !isWhitespace(string[startIndex - 2])) ||
    newlineBefore(string, startIndex - 1);

  if (!beforeOk) {
    utils.report({
      ruleName,
      result,
      node,
      message: messages.expectedBefore(symbol),
      index: startIndex + globalIndex
    });
  }

  const afterOk =
    (string[endIndex + 1] === " " && !isWhitespace(string[endIndex + 2])) ||
    string[endIndex + 1] === "\n" ||
    string.substr(endIndex + 1, 2) === "\r\n";

  if (!afterOk) {
    utils.report({
      ruleName,
      result,
      node,
      message: messages.expectedAfter(symbol),
      index: endIndex + globalIndex
    });
  }
}
563574
function checkConditional(node) {
            const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent, "?");
            const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":");

            if (nonSpacedConsequesntNode) {
                report(node, nonSpacedConsequesntNode);
            } else if (nonSpacedAlternateNode) {
                report(node, nonSpacedAlternateNode);
            }
        }
663492
public static boolean isWhiteSpace(String w) {
		for(int i=0;i<w.length();i++){
			char c = w.charAt(i);
			if(!Character.isWhitespace(c)){
				return false;
			}
		}
		return true;
	}
1153903
public boolean hasDecompBoundary(int c, boolean before) {
        for(;;) {
            if(c<minDecompNoCP) {
                return true;
            }
            int norm16=getNorm16(c);
            if(isHangul(norm16) || isDecompYesAndZeroCC(norm16)) {
                return true;
            } else if(norm16>MIN_NORMAL_MAYBE_YES) {
                return false;  // ccc!=0
            } else if(isDecompNoAlgorithmic(norm16)) {
                c=mapAlgorithmic(c, norm16);
            } else {
                // c decomposes, get everything from the variable-length extra data
                int firstUnit=extraData.charAt(norm16);
                if((firstUnit&MAPPING_LENGTH_MASK)==0) {
                    return false;
                }
                if(!before) {
                    // decomp after-boundary: same as hasFCDBoundaryAfter(),
                    // fcd16<=1 || trailCC==0
                    if(firstUnit>0x1ff) {
                        return false;  // trailCC>1
                    }
                    if(firstUnit<=0xff) {
                        return true;  // trailCC==0
                    }
                    // if(trailCC==1) test leadCC==0, same as checking for before-boundary
                }
                // true if leadCC==0 (hasFCDBoundaryBefore())
                return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (extraData.charAt(norm16-1)&0xff00)==0;
            }
        }
    }