Is there a library, in Java, i.e. Apache Commons or similar, where various ASCII character constants are defined to be reused? Or, perhaps somewhere in Java itself?
For example, I'm looking for something like public final static String ASCII_SUB_CHAR = "\u001a"; and similarly for other ASCII control characters, already defined somewhere for reuse.
Rationale is that it's quite unobvious how, and why, for example SUB corresponds to 26 and how that then becomes "\u001a". There are also ranges to those characters (control vs printable, etc.) so they can be arranged based on a need. Sounded like a good candidate to be expressed in some structure akin to Enums, hence the question.
Thank you in advance.
Check out KeyEvent. It has something similar to what you want and are used for interpreting keyboard input. But they are declared as
intsand they aren't consistently (or intuitively) named. Imo, you would be better off constructing your own and putting them in a library declared as code points.