Applies to
Declaration
property NullReplacement: Char;
Description
NullReplacement is a property that controls the behavior when loading from a stream. If set to ASCII zero (the default), loading from a stream (either with LoadFromStream or Lines.LoadFromStream or Paragraphs.LoadFromStream) stops upon encountering a null character. The stream is then positioned right after the null that is read in. If set to something other than #0, this character will be used as a replacement for nulls encountered in the stream, and reading will proceed until the end. Upon returning, the stream position is at its end.
Set NullReplacement to #0 if you intend to store many things in the same stream or file. In that case, right after doing a save (either SaveToStream or Lines.SaveToStream or Lines.SaveToFile), you should append a null character before streaming other data. Set NullReplacement to something else if you want that reading goes on until the end of the stream or file.
This property is available at design time and at run time, with read and write access.