Upper or Lower case

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cfmx2008
    New Member
    • Jan 2008
    • 36

    Upper or Lower case

    Hi Guys,
    I hope you could help me to solve this problem. Here it is: I have a huge table of data. Some data are Lower case and some are upper case. these data could be changed by agents, But I want to keep the case. For example: if data is Lower case and it changed to upper case at the time of change it should be lower case again. I know sounds terrible, but this is the problem. any hints will be appreciated. thanks
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    toLowerCase() / toUpperCase() should help you.

    Comment

    • cfmx2008
      New Member
      • Jan 2008
      • 36

      #3
      Thank you, but how can I check the case of the original data?

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        Originally posted by cfmx2008
        Thank you, but how can I check the case of the original data?
        I am afraid, for that you would need to go character by character. Check ASCII code of each character. (charCodeAt() should help you there).

        Google for a 'ASCII table', you will get to know the ASCII codes for all alphabets.

        Comment

        • cfmx2008
          New Member
          • Jan 2008
          • 36

          #5
          Thanks. I really appreciate your help.

          Comment

          • hsriat
            Recognized Expert Top Contributor
            • Jan 2008
            • 1653

            #6
            Originally posted by cfmx2008
            Thanks. I really appreciate your help.
            You are welcome :)

            Comment

            Working...