Results 1 to 6 of 6
- 12-03-2009, 12:16 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 1
- Rep Power
- 0
- 12-03-2009, 12:26 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,413
- Blog Entries
- 7
- Rep Power
- 17
What have you done until now and what part of your code made you seek help on this forum?
kind regards,
Jos
- 12-03-2009, 12:36 PM #3
What I'd use is a combination of Character.toLowerCase(ch), Character.toUpperCase(ch), char[] and StringBuilder.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 12-03-2009, 04:33 PM #4
Member
- Join Date
- Feb 2009
- Posts
- 92
- Rep Power
- 0
In case you can't simply use the library functions, you can use a mask to change case, since the off set between upper and lower is a power of two. 0x20 is the correct mask. Use "AND" or "OR" and "negation" as needed. This is assuming the ascii english character set. But that's why it's best to use library functions. Upper case starts at 0x41, lower case at 0x61, IIRC.
Last edited by rdtindsm; 12-03-2009 at 04:41 PM.
- 12-03-2009, 05:04 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,413
- Blog Entries
- 7
- Rep Power
- 17
- 12-04-2009, 12:05 AM #6
Member
- Join Date
- Feb 2009
- Posts
- 92
- Rep Power
- 0
The post started out with what was basically an if statement with a clear conditional. Not trying to suggest that it be done differently from using java classes unless that was was the point of the exercise, which was unspecified. I really tried to make that clear.
At worst, the information might be useful background in other settings. I've had to write these functions in other languages.
Similar Threads
-
simple line problem / for loop problem
By helpisontheway in forum New To JavaReplies: 1Last Post: 11-17-2009, 06:12 AM -
UpperCase problem
By logieen in forum New To JavaReplies: 1Last Post: 08-03-2008, 11:26 PM -
String uppercase/lowercase
By Java Tip in forum Java TipReplies: 0Last Post: 12-19-2007, 09:22 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks