B
Brett
I am working on a program where I need to check a very short string to
see if it is either one or two digits. Specifically I need to check if
there is a second digit or not.
I have tried:
if ( isNull(string someString.charAt(1)) )
if ( string someString.charAt(1) == null )
if ( isNaN(string someString.charAt(1)) )
if ( string someString.length < 2 )
I know that some of these are wrong for a string object (or all are
wrong) but all of these give "cannot resolve symbol" compiler errors.
This seems like it should be a very simple thing to but I not finding a
soultion that can do this. Any help appreciated.
Thanks,
Brett
see if it is either one or two digits. Specifically I need to check if
there is a second digit or not.
I have tried:
if ( isNull(string someString.charAt(1)) )
if ( string someString.charAt(1) == null )
if ( isNaN(string someString.charAt(1)) )
if ( string someString.length < 2 )
I know that some of these are wrong for a string object (or all are
wrong) but all of these give "cannot resolve symbol" compiler errors.
This seems like it should be a very simple thing to but I not finding a
soultion that can do this. Any help appreciated.
Thanks,
Brett