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. General Programming
  3. C / C++ / MFC
  4. str length

str length

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
7 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.
  • V Offline
    V Offline
    VC Maniac
    wrote on last edited by
    #1

    how to get the full length of the string that contains 0's inbetween. I tried _tcslen() on the LPCTSTR, but it gives the string len till the first occurrence of a 0. TIA

    N _ N K V 5 Replies Last reply
    0
    • V VC Maniac

      how to get the full length of the string that contains 0's inbetween. I tried _tcslen() on the LPCTSTR, but it gives the string len till the first occurrence of a 0. TIA

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      But in that case, how will you find the end of the string?

      nave [OpenedFileFinder] [My Blog]

      1 Reply Last reply
      0
      • V VC Maniac

        how to get the full length of the string that contains 0's inbetween. I tried _tcslen() on the LPCTSTR, but it gives the string len till the first occurrence of a 0. TIA

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        Are you talking about a 0 or a NULL present in your string. If it's a 0, it shouldn't be a problem.

        You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_

        1 Reply Last reply
        0
        • V VC Maniac

          how to get the full length of the string that contains 0's inbetween. I tried _tcslen() on the LPCTSTR, but it gives the string len till the first occurrence of a 0. TIA

          N Offline
          N Offline
          Nishad S
          wrote on last edited by
          #4

          ThisIsMeRon wrote:

          string that contains 0's inbetween.

          In this case how do you know the end of string? In this manner, normally the last string will be ending with two consecutive nulls (0s). Is your string so?

          - ns ami -

          1 Reply Last reply
          0
          • V VC Maniac

            how to get the full length of the string that contains 0's inbetween. I tried _tcslen() on the LPCTSTR, but it gives the string len till the first occurrence of a 0. TIA

            K Offline
            K Offline
            kapardhi
            wrote on last edited by
            #5

            you may try this : CString strTemp; --- -- -- // if you need length of string strTemp.GetLength ();

            1 Reply Last reply
            0
            • V VC Maniac

              how to get the full length of the string that contains 0's inbetween. I tried _tcslen() on the LPCTSTR, but it gives the string len till the first occurrence of a 0. TIA

              V Offline
              V Offline
              VC Maniac
              wrote on last edited by
              #6

              hey guys I fixed it. It wasn't a 0 problem.

              N 1 Reply Last reply
              0
              • V VC Maniac

                hey guys I fixed it. It wasn't a 0 problem.

                N Offline
                N Offline
                Nishad S
                wrote on last edited by
                #7

                :)

                - ns ami -

                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