Binarysave string class?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kaymes

    Binarysave string class?

    Is there a string class available that is able to handle binary data that
    may contain #0?
    It should be similar to std::string, but not rely on null terminated data.

    Konstantin

    PS: Sorry, if that message happen to appear twice somewhere. I resent it
    via another server it because it did not appear after over 6 hours.

  • Ivan Vecerina

    #2
    Re: Binarysave string class?

    "kaymes" <news2003@kseil er.de> wrote in message
    news:bodmtl$k6i $1@n.ruf.uni-freiburg.de...
    | Is there a string class available that is able to handle binary data that
    | may contain #0?
    | It should be similar to std::string, but not rely on null terminated data.

    std::string does *not* rely on null-terminated data.
    To allow for NULL chars, all you need to avoid is functions that
    take or return null-terminated strings.


    hth - Ivan
    --
    Ivan Vecerina - expert in medical devices, software - info, links, contact information, code snippets



    Comment

    • Rolf Magnus

      #3
      Re: Binarysave string class?

      kaymes wrote:
      [color=blue]
      > Is there a string class available that is able to handle binary data
      > that may contain #0?[/color]

      You mean '\0'?
      [color=blue]
      > It should be similar to std::string, but not rely on null terminated
      > data.[/color]

      Then use std::string instead :-)
      It does not rely on null termination.

      Comment

      Working...