<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Scans the buffer for an occurrence of an end of line</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="eventbuffer.search.html">EventBuffer::search</a></div> <div class="next" style="text-align: right; float: right;"><a href="eventbuffer.substr.html">EventBuffer::substr</a></div> <div class="up"><a href="class.eventbuffer.html">EventBuffer</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="eventbuffer.searcheol" class="refentry"> <div class="refnamediv"> <h1 class="refname">EventBuffer::searchEol</h1> <p class="verinfo">(PECL event >= 1.5.0)</p><p class="refpurpose"><span class="refname">EventBuffer::searchEol</span> — <span class="dc-title">Scans the buffer for an occurrence of an end of line</span></p> </div> <div class="refsect1 description" id="refsect1-eventbuffer.searcheol-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><strong>EventBuffer::searchEol</strong></span> ([ <span class="methodparam"> <span class="type">int</span> <code class="parameter">$start</code> <span class="initializer"> = -1</span> </span> [, <span class="methodparam"> <span class="type">int</span> <code class="parameter">$eol_style</code> <span class="initializer"> = <strong><code>EventBuffer::EOL_ANY</code></strong> </span> </span> ]] )</div> <p class="para rdfs-comment"> Scans the buffer for an occurrence of an end of line specified by <em><code class="parameter">eol_style</code></em> parameter . It returns numeric position of the string, or <strong><code>FALSE</code></strong> if the string was not found. </p> <p class="para"> If the <em><code class="parameter">start</code></em> argument is provided, it represents the position at which the search should begin; otherwise, the search is performed from the start of the string. If <em><code class="parameter">end</code></em> argument provided, the search is performed between start and end buffer positions. </p> </div> <div class="refsect1 parameters" id="refsect1-eventbuffer.searcheol-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <span class="term"> <em><code class="parameter">start</code></em> </span> <dd> <p class="para"> Start search position. </p> </dd> </dt> <dt> <span class="term"> <em><code class="parameter">eol_style</code></em> </span> <dd> <p class="para"> One of <a href="class.eventbuffer.html#eventbuffer.constants" class="link">EventBuffer:EOL_* constants</a> . </p> </dd> </dt> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-eventbuffer.searcheol-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns numeric position of the first occurance of end-of-line symbol in the buffer, or <strong><code>FALSE</code></strong> if not found. </p> <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function may return Boolean <strong><code>FALSE</code></strong>, but may also return a non-Boolean value which evaluates to <strong><code>FALSE</code></strong>. Please read the section on <a href="language.types.boolean.html" class="link">Booleans</a> for more information. Use <a href="language.operators.comparison.html" class="link">the === operator</a> for testing the return value of this function.</p></div> </div> <div class="refsect1 seealso" id="refsect1-eventbuffer.searcheol-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="eventbuffer.search.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::search()</a> - Scans the buffer for an occurrence of a string</span> </li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="eventbuffer.search.html">EventBuffer::search</a></div> <div class="next" style="text-align: right; float: right;"><a href="eventbuffer.substr.html">EventBuffer::substr</a></div> <div class="up"><a href="class.eventbuffer.html">EventBuffer</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>