For Wez : Stream Abstraction over a String

From: Date: Mon, 22 Oct 2001 23:27:09 +0000
Subject: For Wez : Stream Abstraction over a String
Groups: php.dev 
Request: Send a blank email to php-dev+get-68743@lists.php.net to get a copy of this message
Wez, im not sure if you had planned to do so, but it would be ultra nice to have a stream implemented over an expandable string (for instance wrapping Sascha's smart-strings). its one of the niceties i like in Delphi - you can do something like this : InitialString := 'This is some data'; str := TStringStream.Create(InitialString); str.Write("hello", sizeof('hello')); fileStream := TFileStream.Create('license.txt',fmOpenRead); str.CopyFrom( fileStream, fileStream.Size ); fileStream.free; output := str.DataString; writeln( output ); etc. this would be helpful for an extension im working on. i'd rather have only one 'logical' way of generating output, as opposed to having two separate methods for files and strings. l0t3k

« previous php.dev (#68743) next »