From dee4c1c9638be298f347bc50d95ff6b3cdd64423 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 4 Apr 2003 01:44:12 +0000 Subject: [PATCH] New function: stream_get_line() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@122482 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/fgets.xml | 9 ++- .../stream/functions/stream-get-line.xml | 59 +++++++++++++++++++ 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 reference/stream/functions/stream-get-line.xml diff --git a/reference/filesystem/functions/fgets.xml b/reference/filesystem/functions/fgets.xml index a658556f97..bde6125bbf 100644 --- a/reference/filesystem/functions/fgets.xml +++ b/reference/filesystem/functions/fgets.xml @@ -1,5 +1,5 @@ - + @@ -71,8 +71,11 @@ fclose ($handle); ¬e.line-endings; - See also fread, fopen, - popen, fgetc, + See also fread, + fgetc, + stream_get_line, + fopen, + popen, fsockopen, and socket_set_timeout. diff --git a/reference/stream/functions/stream-get-line.xml b/reference/stream/functions/stream-get-line.xml new file mode 100644 index 0000000000..8fe868999c --- /dev/null +++ b/reference/stream/functions/stream-get-line.xml @@ -0,0 +1,59 @@ + + + + + stream_get_line + Gets line from stream resource up to a given delimiter + + + Description + + stringstream_get_line + resourcehandle + intlength + stringending + + + Returns a string of up to length bytes read from the file + pointed to by handle. Reading ends when + length bytes have been read, when the string specified by + ending is found (which is notincluded + in the return value), or on EOF (whichever comes first). + + + If an error occurs, returns &false;. + + + This function is nearly identical to fgets + except in that it allows end of line delimiters other than the + standard \n, \r, and \r\n, and does not + return the delimiter itself. + + + See also fread, + fgets, and + fgetc, + + + + +