|
-
June 17th, 2008, 07:48 AM
#8
Re: textfield validation
 Originally Posted by keang
If you want to check individual characters to see if they are letters, digits, whitespace, control characters etc you can convert the string to a char array using the toCharArray() method...
Alternatively, you can access them directly from the string using the String.charAt(index) method, e.g. Character.isDigit(myString.charAt(0)).
Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration...
S. Kelly-Bootle
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|