Page

4.7.1- Changing the Case of a String

  by NT Community Manager.  

PublicCategorized as 04. Variables.

Not tagged.
<< 4.7.0- String ManipulationChapter44.7.2- Returning the Length of a String >>

Changing the Case of a String

The two functions that allow you to alter the case of text are LCase and UCase.You can use them in the following way:

 

LCase(string) or UCase(string)

 

So if you applied LCase to"Hello" it would become "hello" and if you applied UCase to"Hello" then it would become "HELLO". If you applied eitherof these functions to a string that was already in the specified case then itwouldn't have any effect. These functions simply alter the case of text that isheld in your variable, without actually altering the contents of the variableitself. You could use these functions as follows:

 

strText="HeLlO"

Response.Write UCase(strText)

Response.Write LCase(strText)

<< 4.7.0- String ManipulationChapter44.7.2- Returning the Length of a String >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |