<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Helvetica, Arial, sans-serif">I've implemented the
!find operator for TableGen.</font></p>
<blockquote>
<p><tt>!find(source_string, target_string [, start-pos])</tt></p>
</blockquote>
<p>It returns the position of the target_string in the
source_string. The question is: What should it return if the there
is no match?</p>
<p>std::string::find() returns npos, which is ~<a class="code"
href="https://llvm.org/doxygen/classsize__t.html">size_t</a>(0).
TableGen's integers are signed. So it could return -1, or it could
return the maximum positive signed integer. Or, it could break
with tradition and return the length of the source_string<font
size="2">. The easiest thing to test for is -1.<br>
</font></p>
<p><font size="2">Opinions, please.</font><br>
</p>
</body>
</html>