java - Finding if a specific character exists at a specific index -


so i'm trying figure out how create condition decision structure. i'm making program converts military time conventional time. when times entered, must in xx:xx format, x equals digit. i'm wondering, how can make validation checks make sure ":" exists colon , in same spot?

mystring.charat(5) == ':'

just change 5 whatever need, , check string length before this, don't ask past end of short string.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -