ok2c commented on code in PR #394: URL: https://github.com/apache/httpcomponents-core/pull/394#discussion_r1117710747
########## httpcore5/src/main/java/org/apache/hc/core5/util/TextUtils.java: ########## @@ -141,4 +141,22 @@ public static String toLowerCase(final String s) { return s.toLowerCase(Locale.ROOT); } + + /** + * Determines whether the given string contains only ASCII characters. + * + * @param s the string to check + * @return true if the string contains only ASCII characters, false otherwise + * @throws IllegalArgumentException if the input string is null + * @since 5.3 + */ + public static boolean isAllASCII(final String s) { Review Comment: @arturobernalg Please make the new method use `CharSequence` as a parameter instead of `String`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org