MCPcopy Create free account
hub / github.com/M66B/FairEmail / containsControlChars

Method containsControlChars

app/src/main/java/eu/faircode/email/Helper.java:2658–2673  ·  view source on GitHub ↗
(String text)

Source from the content-addressed store, hash-verified

2656 }
2657
2658 static boolean containsControlChars(String text) {
2659 int codePoint;
2660 for (int offset = 0; offset < text.length(); ) {
2661 codePoint = text.codePointAt(offset);
2662 offset += Character.charCount(codePoint);
2663 switch (Character.getType(codePoint)) {
2664 case Character.CONTROL: // \p{Cc}
2665 case Character.FORMAT: // \p{Cf}
2666 case Character.PRIVATE_USE: // \p{Co}
2667 case Character.SURROGATE: // \p{Cs}
2668 case Character.UNASSIGNED: // \p{Cn}
2669 return true;
2670 }
2671 }
2672 return false;
2673 }
2674
2675 static Integer parseInt(String text) {
2676 if (TextUtils.isEmpty(text))

Callers 4

afterTextChangedMethod · 0.95
afterTextChangedMethod · 0.95
checkPasswordMethod · 0.95
afterTextChangedMethod · 0.95

Calls 2

lengthMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected