Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development

  • Print
  • + Share This
This chapter is from the book

Uppercasing and Lowercasing

You can easily produce a version of a string where all the characters are uppercase or all the characters are lowercase.

To produce a string in either uppercase or lowercase form:

  1. Declare a new string variable.

  2. Type = str.ToUpper(); or = str.ToLower() accordingly, where str is a variable holding the original string (Figure 4.55).

    Figure 4.55Figure 4.55 The ToUpper function creates a new string object from the original where all characters are in uppercase.


  • The ToUpper and ToLower functions don't change the original string. They produce new strings (and therefore new string buffers) with the characters' case modified.

  • + Share This
  • 🔖 Save To Your Account