阅读背景:

如何使用while循环验证输入字符串

来源:互联网 

I know this might seem like a simple/silly question, but I am trying to keep my code as organized and simple as possible. The problem that I am having is with a while loop for validation. I am validating a string input. I am using the validation simply to make sure that something is entered. The only time I would like the while loop to run is when no information is entered at all, so I would like to include every character and symbol. The question that I have, is that I am wondering if there is a shorter way to include every character possible except for simply hitting enter of course. Here is the simple code snippet.I know this might seem like a simple/silly ques




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: