code: @Nonnegative
    public static int getUTF8ByteCount (@Nonnegative final int c)
    {
      ValueEnforcer.isBetweenInclusive (c, "c", Character.MIN_VALUE, Character.MAX_VALUE);
  
      // see JVM spec 4.4.7, p 111
      // http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html
      // #1297
      if (c == 0)
        return 2;
  
      // Source: http://icu-project.org/apiref/icu4c/utf8_8h_source.html
      if (c <= 0x7f)
        return 1;
      if (c <= 0x7ff)
        return 2;
      if (c <= 0xd7ff)
        return 3;
  
      // It's a surrogate...
      return 0;
    }
docs: Get the number of bytes necessary to represent the passed character.
  
  @param c
  The character to be evaluated.
  @return A non-negative value.