I got a seq like this:
(\$ \# \A \( \* \& \9 \8 \7 \Z \f)
I want to filter out uppercase ASCII letters in it like \A and \Z
I tried to look up in the standard library but no luck.
Can anybody help me?
isUpperCase(char ch) determines if the specified character is an uppercase character. A character is uppercase if its general category type, provided by Character. getType(ch), is UPPERCASE_LETTER. or it has contributory property Other_Uppercase as defined by the Unicode Standard.
To check if a letter in a string is uppercase or lowercase use the toUpperCase() method to convert the letter to uppercase and compare it to itself. If the comparison returns true , then the letter is uppercase, otherwise it's lowercase.
The C library function int isupper(int c) checks whether the passed character is uppercase letter.
Use the following
(filter #(Character/isUpperCase %) `(\$ \# \A \( \* \& \9 \8 \7 \Z \f))
Results : (\A \Z)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With