home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / strings.swg / 0002_CLEANSTR.PAS.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-05-28  |  568 b   |  13 lines

  1. Procedure CleanString(Var s:String);
  2. begin
  3.   fillChar(s,sizeof(s),0);
  4. end;
  5. { I think that I already posted this form once, but here it is again...
  6.  This is the best way, For what the original poster wanted it for- to
  7.  clear out a String to Write to a File.  Method #1 above will overfill
  8.  any subranged String, yours only clears out the current size of the
  9.  String (ie if you had s:String; s := 'a'; then your Procedure would
  10.  only fill the first Character.  The last version merely fills the
  11.  entire String no matter what the size of it is.
  12. -Brian Pape
  13. }