Advertisement
DulcetAirman

Telugu Char Count

Feb 16th, 2017
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. package ch.claude_martin.stuff;
  2.  
  3. import java.text.Normalizer;
  4.  
  5. class SomeClass {
  6.   public static void main(final String[] args) {
  7.     final String str = "నమస్కారం";
  8.     final String normalized = Normalizer.normalize(str, Normalizer.Form.NFKC);
  9.     final long result = normalized.codePoints()
  10.         .filter(Character::isLetter)
  11.         .count();
  12.     System.out.println(result);
  13.   }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement