Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. initcaps

initcaps

Scheduled Pinned Locked Moved ASP.NET
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srinandan
    wrote on last edited by
    #1

    hi :) i have need to change the 1st character of the word should in caps along Tostring(). like s="south africa" should s="South Africa" Regards, sri.

    E S 2 Replies Last reply
    0
    • S srinandan

      hi :) i have need to change the 1st character of the word should in caps along Tostring(). like s="south africa" should s="South Africa" Regards, sri.

      E Offline
      E Offline
      enjoycrack
      wrote on last edited by
      #2

      I'm not sure if there is a buit in funtion to do that... but just give my idea.. - split the s tring into array of words - capitalize the first character of each word << >>

      8x Solutions Ltd

      1 Reply Last reply
      0
      • S srinandan

        hi :) i have need to change the 1st character of the word should in caps along Tostring(). like s="south africa" should s="South Africa" Regards, sri.

        S Offline
        S Offline
        Spunky Coder
        wrote on last edited by
        #3

        I think there is no built-in function to do that.. use the following.. s = s.Substring(0, 1).ToUpper() + s.Substring(1);

        Koushik

        C 1 Reply Last reply
        0
        • S Spunky Coder

          I think there is no built-in function to do that.. use the following.. s = s.Substring(0, 1).ToUpper() + s.Substring(1);

          Koushik

          C Offline
          C Offline
          cisco2103
          wrote on last edited by
          #4

          You can use the proper function which will capitalize the first letter of each word.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups