Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-31-2008, 02:58 PM
Member
 
Join Date: Jan 2008
Posts: 17
gapper is on a distinguished road
Getting ASCII codes of character
I am writing a method that will take a character and will check if it lies under ASCII range. I know the ASCII codes range but don't know exactly how to proceed. The method signature is as follows:

Code:
public static boolean validateCharacter(char a) { ... }
Kindly advice.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-02-2008, 10:42 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 644
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
If you know the range, you can simply check for the number in that range, for example:
Code:
1) if char a is a value between 97 to 122 i) output "lowercase character" or "in range"
You could also find an API provided ways to test for these problems.
__________________
Want to voice your opinion on your IDE/Editor of choice? Vote now!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling ASCII character set in Java (III) JavaForums Java Blogs 0 02-08-2008 10:31 AM
Handling ASCII character set in Java (II) JavaForums Java Blogs 0 02-07-2008 02:00 PM
Handling ASCII character set in Java (I) JavaForums Java Blogs 0 02-07-2008 02:00 PM
Validating ASCII character set JavaForums Java Blogs 0 01-20-2008 12:40 PM
How to obtain ASCII code of a character karma New To Java 1 05-20-2007 12:37 PM


All times are GMT +3. The time now is 01:21 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org