pending

Thread: pending \0 in string?

in string?

This is a discussion on pending

Thread: pending \0 in string?

in string?
within the C# Programming forums, part of the General Programming Boards category; Hello everyone, I am using the following code to read a string. The content of message is ends with a ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    pending \0 in string?

    Hello everyone,


    I am using the following code to read a string. The content of message is ends with a lot of \0 characters. Why and how to remove them?

    (context is an instance of HttpListenerContext, and my code is read Http request from begin to end)

    Code:
                    using (StreamReader requestStream = new StreamReader(context.Request.InputStream))
                    {
                        message = requestStream.ReadToEnd();
                    }

    thanks in advance,
    George

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    Sounds vaguely familiar, how did you manage it last time ? Maybe it's the same problem.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 05:30 PM
  2. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 07:02 AM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 07:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21