<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 05/03/2025 11:24, David Carlisle
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEW6iOihneqQbwN4w+DONM+kpoOaKr_YhtF0Hn5p6Pvfrc_Vcw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_quote gmail_quote_container">LaTeX has been
providing a strcmp implementation in Lua for decades so for
the vast majority of users such issues (the point of the
thread started by Peter) simply don't exist. If you choose to
use plain tex and ignore decades of development by other
people that's fine but you then need to actually do the work
of doing those implementations,</div>
</div>
</blockquote>
<p>Except that in my <i>preferred</i> processor (XeTeX), I do not <i>need</i>
LaTeX in order to perform a simple string comparison (as indeed I
don't <i>need </i>LaTeX in order to do anything, nor have I ever
done) — XeTeX provides me (and others) with a simple functional
primitive. If LuaTeX does not, then perhaps LuaTeX should be
enhanced so to do.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAEW6iOihneqQbwN4w+DONM+kpoOaKr_YhtF0Hn5p6Pvfrc_Vcw@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote gmail_quote_container"> but to give you
a start latex uses
<div><br>
</div>
<div>[code stripped]<br>
</div>
<div><br>
</div>
<div>You might want to call it \strcmp rather than
\tex_strcmp:D but otherwise it should work put it inside
\directlua{...}</div>
</div>
</div>
</blockquote>
<p>Thank you — that is most helpful. Sadly it did not work out of
the box, until I realised that the "<font face="monospace">\begin{macro}[no-user-doc]{\tex_strcmp:D}</font>"
did not belong inside \directlua {} but was in fact pure LaTeX
code. Replacing that part with <br>
</p>
<p><font face="monospace">\def \strcmp<br>
{%<br>
\directlua<br>
{%<br>
% Compare two strings, expanding to |0| if
they are equal,<br>
% [...]</font></p>
<p><font face="monospace"> }%<br>
}</font></p>
<p>does indeed appear to allow me to compare strings <i><span><span
data-dobid="hdw">à la</span></span></i> XeTeX<font
face="monospace">.</font> Many thanks !<font face="monospace"><br>
</font></p>
<blockquote type="cite"
cite="mid:CAEW6iOihneqQbwN4w+DONM+kpoOaKr_YhtF0Hn5p6Pvfrc_Vcw@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote gmail_quote_container">
<div>I removed tex-live list, it's unrelated to tex-live and
I'm sure Karl has other things to do with TL2025 release</div>
</div>
</div>
</blockquote>
<p>Well, the thread <i>started</i> on the TeX-Live list, so it
seemed only courteous and proper to keep it in the CC list. Peter
FLynn cc'd, as I do not know whether he subscribes to TeXhax.<br>
</p>
<p>-- <br>
<i>** Phil.</i><br>
</p>
</body>
</html>