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. The Lounge
  3. If I had a goat...

If I had a goat...

Scheduled Pinned Locked Moved The Lounge
csharpquestion
10 Posts 7 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.
  • P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #1

    ya know what would really get it? That (in Unicode and therefore .net) NULL-characters are allowed in strings yet aren't considered whitespace. :mad:

    Sander RosselS M Richard DeemingR 3 Replies Last reply
    0
    • P PIEBALDconsult

      ya know what would really get it? That (in Unicode and therefore .net) NULL-characters are allowed in strings yet aren't considered whitespace. :mad:

      Sander RosselS Offline
      Sander RosselS Offline
      Sander Rossel
      wrote on last edited by
      #2

      Nuii | Keroro Wiki | FANDOM powered by Wikia[^] Why would anime characters be allowed in strings or considered whitespace? :confused:

      Best, Sander Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

      M 1 Reply Last reply
      0
      • Sander RosselS Sander Rossel

        Nuii | Keroro Wiki | FANDOM powered by Wikia[^] Why would anime characters be allowed in strings or considered whitespace? :confused:

        Best, Sander Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        You rotten so and so - I followed your link and seriously though "that can't be right" I then used google and it made a lot more sense.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • P PIEBALDconsult

          ya know what would really get it? That (in Unicode and therefore .net) NULL-characters are allowed in strings yet aren't considered whitespace. :mad:

          M Offline
          M Offline
          Munchies_Matt
          wrote on last edited by
          #4

          A NULL character is part and parcel of a string. Otherwise you need some form of counted string,, otherwise the length is undetermined.

          C O 2 Replies Last reply
          0
          • M Munchies_Matt

            A NULL character is part and parcel of a string. Otherwise you need some form of counted string,, otherwise the length is undetermined.

            C Offline
            C Offline
            CodeWraith
            wrote on last edited by
            #5

            The string is over when the fat lady sings.

            I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

            1 Reply Last reply
            0
            • M Munchies_Matt

              A NULL character is part and parcel of a string. Otherwise you need some form of counted string,, otherwise the length is undetermined.

              O Offline
              O Offline
              Orjan Westin
              wrote on last edited by
              #6

              In .Net, string is a class, and has a length variable, so can contain NULL in the middle. Just like the std::string class in C++. FWIW, I thought the Pascal style of having the length in the first char was quite neat (though that limited it to strings of < 255 characters).

              M 1 Reply Last reply
              0
              • O Orjan Westin

                In .Net, string is a class, and has a length variable, so can contain NULL in the middle. Just like the std::string class in C++. FWIW, I thought the Pascal style of having the length in the first char was quite neat (though that limited it to strings of < 255 characters).

                M Offline
                M Offline
                Munchies_Matt
                wrote on last edited by
                #7

                Like the UNICODE_STRING we use in the kernel, it contains a length member and a pointer to the string data.

                Orjan Westin wrote:

                can contain NULL in the middle

                SOunds a bit like a multi string, nulls in the middle, ,two at the end. Why would you want a null in the middle of a string though? How does it make it useful?

                C 1 Reply Last reply
                0
                • M Munchies_Matt

                  Like the UNICODE_STRING we use in the kernel, it contains a length member and a pointer to the string data.

                  Orjan Westin wrote:

                  can contain NULL in the middle

                  SOunds a bit like a multi string, nulls in the middle, ,two at the end. Why would you want a null in the middle of a string though? How does it make it useful?

                  C Offline
                  C Offline
                  CodeWraith
                  wrote on last edited by
                  #8

                  If you have a good old VT-52, it finally gets something it can safely ignore:

                  Quote:

                  00 Null Never affects the device. codes are always ignored wherever they appear in the character stream.

                  I have lived with several Zen masters - all of them were cats. His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

                  1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    ya know what would really get it? That (in Unicode and therefore .net) NULL-characters are allowed in strings yet aren't considered whitespace. :mad:

                    Richard DeemingR Offline
                    Richard DeemingR Offline
                    Richard Deeming
                    wrote on last edited by
                    #9

                    PIEBALDconsult wrote:

                    aren't considered whitespace

                    Take it up with the Unicode consortium. NULL is defined as a control character[^], not a space character[^]. It would be rather perverse for .NET to ignore that categorisation.


                    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                    "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                    P 1 Reply Last reply
                    0
                    • Richard DeemingR Richard Deeming

                      PIEBALDconsult wrote:

                      aren't considered whitespace

                      Take it up with the Unicode consortium. NULL is defined as a control character[^], not a space character[^]. It would be rather perverse for .NET to ignore that categorisation.


                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                      P Offline
                      P Offline
                      PIEBALDconsult
                      wrote on last edited by
                      #10

                      I'll update my rant to blame Unicode.

                      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