You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ok2c (via GitHub)" <gi...@apache.org> on 2023/02/24 21:55:51 UTC

[GitHub] [httpcomponents-core] ok2c commented on a diff in pull request #394: Add support for Internationalized Domain Names (IDN)

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-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org