Preserved Topic: How do I determine the casing of a letter? |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: Maryland, USA |
posted 08-16-2002 20:35
Lets say i wanted to take all of the capital letters of a string and delete them; how would i determine if a letter is a lowercase or an uppercase letter? |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 08-17-2002 05:59
You're best bet is probably a regular expressions |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-17-2002 07:26
it's for perl, but I think the regexp's work the same.. |
Paranoid (IV) Inmate From: Lebanon |
posted 08-17-2002 09:37
usually to do that from the very low level you have to check each character's ascii code range, |
Paranoid (IV) Inmate From: Maryland, USA |
posted 08-17-2002 14:53
code: function reversecaps() {
|
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-17-2002 17:44
You have a few errors in your code. Here's the fixed version: |
Maniac (V) Mad Scientist From: 127 Halcyon Road, Marenia, Atlantis |
posted 08-17-2002 17:47
pretty elegant solution, lallous.. |
Paranoid (IV) Inmate From: Dublin, Ireland |
posted 08-17-2002 18:24
I havent read the other posts but: |