blob: 41e70da68a3ec9b00472ed69d44722d9c9499def [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: instr</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/r.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head><body>
<table width="100%" summary="page for instr {SparkR}"><tr><td>instr {SparkR}</td><td align="right">R Documentation</td></tr></table>
<h2>instr</h2>
<h3>Description</h3>
<p>Locate the position of the first occurrence of substr column in the given string.
Returns null if either of the arguments are null.
</p>
<h3>Usage</h3>
<pre>
## S4 method for signature 'Column,character'
instr(y, x)
instr(y, x)
</pre>
<h3>Details</h3>
<p>NOTE: The position is not zero based, but 1 based index, returns 0 if substr
could not be found in str.
</p>
<h3>See Also</h3>
<p>Other string_funcs: <code><a href="ascii.html">ascii</a></code>,
<code><a href="ascii.html">ascii</a></code>; <code><a href="base64.html">base64</a></code>,
<code><a href="base64.html">base64</a></code>; <code><a href="concat_ws.html">concat_ws</a></code>,
<code><a href="concat_ws.html">concat_ws</a></code>; <code><a href="concat.html">concat</a></code>,
<code><a href="concat.html">concat</a></code>; <code><a href="decode.html">decode</a></code>,
<code><a href="decode.html">decode</a></code>; <code><a href="encode.html">encode</a></code>,
<code><a href="encode.html">encode</a></code>; <code><a href="format_number.html">format_number</a></code>,
<code><a href="format_number.html">format_number</a></code>; <code><a href="format_string.html">format_string</a></code>,
<code><a href="format_string.html">format_string</a></code>; <code><a href="initcap.html">initcap</a></code>,
<code><a href="initcap.html">initcap</a></code>; <code><a href="length.html">length</a></code>;
<code><a href="levenshtein.html">levenshtein</a></code>, <code><a href="levenshtein.html">levenshtein</a></code>;
<code><a href="locate.html">locate</a></code>, <code><a href="locate.html">locate</a></code>;
<code><a href="lower.html">lower</a></code>, <code><a href="lower.html">lower</a></code>;
<code><a href="lpad.html">lpad</a></code>, <code><a href="lpad.html">lpad</a></code>;
<code><a href="ltrim.html">ltrim</a></code>, <code><a href="ltrim.html">ltrim</a></code>;
<code><a href="regexp_extract.html">regexp_extract</a></code>,
<code><a href="regexp_extract.html">regexp_extract</a></code>;
<code><a href="regexp_replace.html">regexp_replace</a></code>,
<code><a href="regexp_replace.html">regexp_replace</a></code>; <code><a href="reverse.html">reverse</a></code>,
<code><a href="reverse.html">reverse</a></code>; <code><a href="rpad.html">rpad</a></code>,
<code><a href="rpad.html">rpad</a></code>; <code><a href="rtrim.html">rtrim</a></code>,
<code><a href="rtrim.html">rtrim</a></code>; <code><a href="soundex.html">soundex</a></code>,
<code><a href="soundex.html">soundex</a></code>; <code><a href="substring_index.html">substring_index</a></code>,
<code><a href="substring_index.html">substring_index</a></code>; <code><a href="translate.html">translate</a></code>,
<code><a href="translate.html">translate</a></code>; <code><a href="trim.html">trim</a></code>,
<code><a href="trim.html">trim</a></code>; <code><a href="unbase64.html">unbase64</a></code>,
<code><a href="unbase64.html">unbase64</a></code>; <code><a href="upper.html">upper</a></code>,
<code><a href="upper.html">upper</a></code>
</p>
<h3>Examples</h3>
<pre><code class="r">## Not run: instr(df$c, &#39;b&#39;)
</code></pre>
<hr><div align="center">[Package <em>SparkR</em> version 1.6.3 <a href="00Index.html">Index</a>]</div>
</body></html>