@Test public void asciiTest() { assertFalse(StringUtil.isAscii("Réal")); assertTrue(StringUtil.isAscii("Real")); }
public static boolean isAscii(@NonNull String text) { Objects.requireNonNull(text, "text is null"); return StandardCharsets.US_ASCII.newEncoder().canEncode(text); }
StringUtil { public static boolean isAscii(@NonNull String text) { Objects.requireNonNull(text, "text is null"); return StandardCharsets.US_ASCII.newEncoder().canEncode(text); } }
StringUtil { public static boolean isAscii(@NonNull String text) { Objects.requireNonNull(text, "text is null"); return StandardCharsets.US_ASCII.newEncoder().canEncode(text); }  }
StringUtil { public static boolean isAscii(@NonNull String text) { Objects.requireNonNull(text, "text is null"); return StandardCharsets.US_ASCII.newEncoder().canEncode(text); }  static boolean isAscii(@NonNull String text); }
StringUtil { public static boolean isAscii(@NonNull String text) { Objects.requireNonNull(text, "text is null"); return StandardCharsets.US_ASCII.newEncoder().canEncode(text); }  static boolean isAscii(@NonNull String text);  }