summaryrefslogtreecommitdiffstats
path: root/tapsets/API-tokenize.html
blob: 8b0aed2ce03fbffa8a6c1426742b33d72dcd6ad3 (plain) (blame)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>function::tokenize</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-text-strn.html" title="function::text_strn"><link rel="next" href="ansi.stp.html" title="Chapter 29. Utility functions for using ansi control chars in logs"></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::tokenize</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-text-strn.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="ansi.stp.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-tokenize"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>function::tokenize — Return the next non-empty token in a string </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">1) tokenize:string(delim:string)</pre><pre class="programlisting">2) tokenize:string(input:string,delim:string)</pre></div><div class="refsect1"><a name="id2428"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>delim</code></em></span></dt><dd><p> set of characters that delimit the tokens </p></dd><dt><span class="term"><em class="parameter"><code>input</code></em></span></dt><dd><p> string to tokenize. If empty, returns the next non-empty token in the string passed in the previous call to <code class="function">tokenize</code>. </p></dd></dl></div></div><div class="refsect1"><a name="id2429"></a><h2>Description</h2><p>1) This function returns the next token in the string passed in the previous call to tokenize. If no delimiter is found, the entire remaining input string is * returned. It returns empty when no more tokens are available.</p><p>2) This function returns the next non-empty token in the given input string, where the tokens are delimited by characters in the delim string. If the input string is non-empty, it returns the first token. If the input string is empty, it returns the next token in the string passed in the previous call to tokenize. If no delimiter is found, the entire remaining input string is returned. It returns empty when no more tokens are available.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-text-strn.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="ansi.stp.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">function::text_strn</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 29. Utility functions for using ansi control chars in logs</td></tr></table></div></body></html>