mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
2 lines
No EOL
2.5 KiB
HTML
2 lines
No EOL
2.5 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Find (containers.CCString.Find)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc %%VERSION%%"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">containers</a> » <a href="../index.html">CCString</a> » Find</nav><h1>Module <code>CCString.Find</code></h1></header><dl><dt class="spec type" id="type-pattern"><a href="#type-pattern" class="anchor"></a><code><span class="keyword">type</span> <span>_ pattern</span></code></dt></dl><dl><dt class="spec value" id="val-compile"><a href="#val-compile" class="anchor"></a><code><span class="keyword">val</span> compile : string <span>-></span> <span><span>[ `Direct ]</span> <a href="index.html#type-pattern">pattern</a></span></code></dt><dt class="spec value" id="val-rcompile"><a href="#val-rcompile" class="anchor"></a><code><span class="keyword">val</span> rcompile : string <span>-></span> <span><span>[ `Reverse ]</span> <a href="index.html#type-pattern">pattern</a></span></code></dt><dt class="spec value" id="val-find"><a href="#val-find" class="anchor"></a><code><span class="keyword">val</span> find : <span>?⁠start:int</span> <span>-></span> <span>pattern:<span><span>[ `Direct ]</span> <a href="index.html#type-pattern">pattern</a></span></span> <span>-></span> string <span>-></span> int</code></dt><dd><p>Search for <code>pattern</code> in the string, left-to-right.</p><dl><dt>returns</dt><dd><p>the offset of the first match, -1 otherwise.</p></dd></dl><dl><dt>parameter start</dt><dd><p>offset in string at which we start.</p></dd></dl></dd></dl><dl><dt class="spec value" id="val-rfind"><a href="#val-rfind" class="anchor"></a><code><span class="keyword">val</span> rfind : <span>?⁠start:int</span> <span>-></span> <span>pattern:<span><span>[ `Reverse ]</span> <a href="index.html#type-pattern">pattern</a></span></span> <span>-></span> string <span>-></span> int</code></dt><dd><p>Search for <code>pattern</code> in the string, right-to-left.</p><dl><dt>returns</dt><dd><p>the offset of the start of the first match from the right, -1 otherwise.</p></dd></dl><dl><dt>parameter start</dt><dd><p>right-offset in string at which we start.</p></dd></dl></dd></dl></div></body></html> |