+ 3

How do i write c++ ispunct() method in java?

14th May 2020, 11:48 PM
Yakubu Solomon
Yakubu Solomon - avatar
2 odpowiedzi
+ 3
You could use if (Character.toString(myChar).matches("\\p{Punct}"))
15th May 2020, 12:25 AM
Arsenic
Arsenic - avatar
+ 1
or for some situation this can help too if ( ! Character.isLetterOrDigit( c ) )
15th May 2020, 2:45 AM
zemiak