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. strings

strings

Scheduled Pinned Locked Moved ASP.NET
question
6 Posts 5 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
    seemamltn
    wrote on last edited by
    #1

    Hi, I have a string strA = "12 MyAddress" strB = "Your Name" I want to get the first char of string and want to know weather it is integer between 1-9 or char between A-B. How can I do that.

    seema

    C L B 3 Replies Last reply
    0
    • S seemamltn

      Hi, I have a string strA = "12 MyAddress" strB = "Your Name" I want to get the first char of string and want to know weather it is integer between 1-9 or char between A-B. How can I do that.

      seema

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Please, please do not cross post the entire site. It's just annoying.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      1 Reply Last reply
      0
      • S seemamltn

        Hi, I have a string strA = "12 MyAddress" strB = "Your Name" I want to get the first char of string and want to know weather it is integer between 1-9 or char between A-B. How can I do that.

        seema

        L Offline
        L Offline
        leckey 0
        wrote on last edited by
        #3

        Because you cross-posted in three forums you are being sent to the corner with no food, caffeine or code until I am done whipping you with my TechNet magazine, or until Microsoft comes makes a bug-free operating system.

        _____________________________________________ Flea Market! It's just like...it's just like...A MINI-MALL!

        P 1 Reply Last reply
        0
        • L leckey 0

          Because you cross-posted in three forums you are being sent to the corner with no food, caffeine or code until I am done whipping you with my TechNet magazine, or until Microsoft comes makes a bug-free operating system.

          _____________________________________________ Flea Market! It's just like...it's just like...A MINI-MALL!

          P Offline
          P Offline
          Psycho Coder Extreme
          wrote on last edited by
          #4

          leckey wrote:

          or until Microsoft comes makes a bug-free operating system

          damn, for THAT long?

          "Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean." Tom Welch

          1 Reply Last reply
          0
          • S seemamltn

            Hi, I have a string strA = "12 MyAddress" strB = "Your Name" I want to get the first char of string and want to know weather it is integer between 1-9 or char between A-B. How can I do that.

            seema

            B Offline
            B Offline
            BasharatAli
            wrote on last edited by
            #5

            value = "12 MyAddress" c = value.Substring(0, 1) If Char.IsDigit(c) Then Throw New Exception("its a number : " & c) End If If Char.IsLetter(c) Then Throw New Exception("its a char : " & c) End If is it helpful for you? Basharat

            C 1 Reply Last reply
            0
            • B BasharatAli

              value = "12 MyAddress" c = value.Substring(0, 1) If Char.IsDigit(c) Then Throw New Exception("its a number : " & c) End If If Char.IsLetter(c) Then Throw New Exception("its a char : " & c) End If is it helpful for you? Basharat

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              This does add something to the solutions alread given Specifically it adds code that doesn't perform the test he asked for, and it throws exceptions.

              Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

              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