DulcetAirman

Telugu Char Count

Feb 16th, 2017
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data