blob: 0163a24f29a3d95f04eb985dd697a05a2f15a359 (
plain) (
blame) 
 | 1 2 3 4 5 6 7 8 9 10 11 12 13  | <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>function::strpos</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="SystemTap Tapset Reference Manual"><link rel="up" href="string.stp.html" title="Chapter 28. A collection of standard string functions"><link rel="prev" href="API-strlen.html" title="function::strlen"><link rel="next" href="API-strtol.html" title="function::strtol"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">function::strpos</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-strlen.html">Prev</a> </td><th width="60%" align="center">Chapter 28. A collection of standard string functions</th><td width="20%" align="right"> <a accesskey="n" href="API-strtol.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-strpos"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>function::strpos — Returns location of a substring within another string </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> strpos:long(s1:string,s2:string) </pre></div><div class="refsect1"><a name="id2418"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>s1</code></em></span></dt><dd><p> string to search in </p></dd><dt><span class="term"><em class="parameter"><code>s2</code></em></span></dt><dd><p> substring to find </p></dd></dl></div></div><div class="refsect1"><a name="id2419"></a><h2>Description</h2><p> This function returns location of the first occurence of string <em class="parameter"><code>s2</code></em> within <em class="parameter"><code>s1</code></em>, namely the return value is 0 in case <em class="parameter"><code>s2</code></em> is a prefix of <em class="parameter"><code>s1</code></em>. If <em class="parameter"><code>s2</code></em> is not a substring of <em class="parameter"><code>s1</code></em>, then the return value is -1. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-strlen.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="string.stp.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-strtol.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">function::strlen</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">function::strtol</span></td></tr></table></div></body></html> 
 |