Skip to content

Commit

Permalink
Clarify return value of strcmp() and friends
Browse files Browse the repository at this point in the history
  • Loading branch information
mumumu committed Jun 19, 2024
1 parent 73d38a4 commit f8bcfe2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions appendices/migration82/other-changes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: d5a469df43e34526de33d5ee0e9f8788af2fe443 Maintainer: mumumu Status: ready -->
<!-- EN-Revision: 40364a64d707d6ec49f6870045807c93e09dba6d Maintainer: mumumu Status: ready -->
<sect1 xml:id="migration82.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>その他の変更</title>

Expand Down Expand Up @@ -50,7 +50,10 @@
<function>strcmp</function>, <function>strcasecmp</function>,
<function>strncmp</function>, <function>strncasecmp</function>,
<function>substr_compare</function> は、
<literal>-1</literal>, <literal>0</literal>, <literal>1</literal> を返すようになりました。
比較対象の文字列の長さが等しくないときに <code>strlen($string1) - strlen($string2)</code> を返すことが保証されなくなり、
<literal>-1</literal> や <literal>1</literal> を返すようになりました。
返される具体的な値に依存する代わりに、これらの関数の戻り値は
<literal>0</literal> と比較すべきです。
</para>
</sect3>

Expand Down

0 comments on commit f8bcfe2

Please sign in to comment.