ID: 9173
Updated by: cynic
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Open
Bug Type: Feature/Change Request
Assigned To: 
Comments:

user feedback:
***************
getline in C++ does not limit the delim character with just a newline.  if I wanted, I 
could do a getline on a string stream where the line ends with "|".  example:

strstream sin;
sin.getline( szBuffer, nLength, '|' );

I would think this would be highly useful.  It is just a suggested feature to add.
Also, with getline, it does not return the delim "|" character in the szBuffer.
***************

ok, re-opened

Previous Comments:
---------------------------------------------------------------------------

[2001-02-08 10:02:19] [EMAIL PROTECTED]
please, read the manual: fgets does what you want.

---------------------------------------------------------------------------

[2001-02-08 09:47:41] [EMAIL PROTECTED]
Add a getline feature to the file and string routines.  is it possible to incorporate 
the iostream style stdin/stdout in php? 

this is the getline i wrote:

function getline( $fp, $delim )
{
    $result = "";
    while( !feof( $fp ) )
    {
        $tmp = fgetc( $fp );
        if( $tmp == $delim )
            return $result;
       $result .= $tmp;
    }
    return $result;
}

---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9173&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to