Hi, I'm trying to prevent the user to input a space between characters or numbers. The user can only enter 15 character with any combination with numbers. Any ideas on how to do it? this is my code:
if (input.length() <= 15) {
index = 0;
do {
// check if characters are letters and digits
for (int i = 0; i < input.length(); i++){
As far as I know you can't prevent them from not typing something (maybe some OS specific function to manipulate the console can?), but you can format what they type to your liking.
I meant software-wise. On windows you can hook into the console and do all sorts of stuff. I'm not sure if what you want is something you can do though.