(Character/isDigit \2) ;;=> true
Clojure ships with a powerful string processing library, clojure.string. This is often more idiomatic than interop.
In this exercise you will implement a partial set of utility routines to help a developer clean up identifier names.
In the 5 tasks you will gradually build up the routine
A valid identifier comprises zero or more letters and underscores.
In all cases the input string is guaranteed to be non-nil.
If an empty string is passed to the
an empty string should be returned.
Note that the caller should avoid calling the routine
with an empty identifier since such identifiers are ineffectual.
clean function to replace any spaces with underscores.
This also applies to leading and trailing spaces.
(clean "my Id") ;;=> "my___Id"
clean function to replace control characters with
the upper case string
A character is considered to be an ISO control character if
its code is in the range '\u0000' through '\u001F'
or in the range '\u007F' through '\u009F'.
(clean "my\u007FId") ;;=> "myCTRLId"
clean function to convert kebab-case to camelCase.
(clean "à-ḃç") ;;=> "àḂç"
clean function to omit any characters that are not letters.
Note: The underscores must be preserved from the previous step.
(clean "1😀2😀3😀") ;; => ""
clean function to omit any Greek letters in the range 'α' to 'ω'.
(clean "MyΟβιεγτFinder") ;;=> "MyΟFinder"