I have seen multiple people (In the Elixir Slack group 
<https://elixir-lang.slack.com/archives/general/p1462294660007855>, on 
Reddit 
<https://www.reddit.com/r/elixir/comments/4h4y4e/whats_missing_from_the_elixir_ecosystem/d2nvbwd>)
 
during the last couple of days requiring something that checks if a 
(possibly long) string contains e.g. only alphanumeric characters.

It is possible to do this using regular expressions right now:
~r/[^[:alnum:]]/u

but this is very slow.

My proposal is to add the following boolean functions to the String module:


   -  alphabetic?
   -  numeric?
   -  alphanumeric?
   -  whitespace?
   -  uppercase? 
   -  lowercase?
   -  control_character?
   

Function heads for these functions can probably be best generated by using 
compile-time macros similar to what other unicode-based functions already 
use.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/4f52e661-5664-4ce3-a3e6-04f0dc871a53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to