[DTrace-devel] [PATCH 13/20] doc: Clean up the table for string relational operators

eugene.loh at oracle.com eugene.loh at oracle.com
Fri Sep 26 19:05:50 UTC 2025


From: Eugene Loh <eugene.loh at oracle.com>

The text referred to "Table 1", which is not otherwise identified.  It
included a link using an undefined ID.  Scrap both, especially since the
table immediately follows the text anyhow.  Clean that up.

Also, the "String Assignment" link was missing its anchor tag.  Add one.

While we are at it, for better readability and maintainability of the
source file:

- convert the table from HTML to Markdown

- introduce line breaks into the very long text line

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 .../dtrace-ref-DTraceSupportforStrings.md     | 72 ++++---------------
 1 file changed, 14 insertions(+), 58 deletions(-)

diff --git a/doc/userguide/reference/dtrace-ref-DTraceSupportforStrings.md b/doc/userguide/reference/dtrace-ref-DTraceSupportforStrings.md
index 38ddc4c08..af4e9de20 100644
--- a/doc/userguide/reference/dtrace-ref-DTraceSupportforStrings.md
+++ b/doc/userguide/reference/dtrace-ref-DTraceSupportforStrings.md
@@ -80,65 +80,21 @@ Scalar type expressions, such as a pointer or integer, or a scalar array address
 
 ## String Comparison
 
-D overloads the binary relational operators and permits them to be used for string comparisons, as well as integer comparisons. The relational operators perform string comparison whenever both operands are of type `string` or when one operand is of type `string` and the other operand can be promoted to type `string`. See [String Assignment](dtrace-ref-DTraceSupportforStrings.md) for a detailed description. See also [Table 1](dtrace-ref-DTraceSupportforStrings.md#dt_t14_dlang), which lists the relational operators that can be used to compare strings.
+D overloads the binary relational operators and permits them to be used for string comparisons, as well as integer comparisons.
+The relational operators perform string comparison whenever both operands are of type `string`
+or when one operand is of type `string` and the other operand can be promoted to type `string`.
+See [String Assignment](#string-assignment) for a detailed description.
+See also the following table, which lists the relational operators that can be used to compare strings.
+
+| Operator | Description                                                       |
+| :---     | :---                                                              |
+| `<`      | Left-hand operand is less than right-operand.                     |
+| `<=`     | Left-hand operand is less than or equal to right-hand operand.    |
+| `>`      | Left-hand operand is greater than right-hand operand.             |
+| `>=`     | Left-hand operand is greater than or equal to right-hand operand. |
+| `==`     | Left-hand operand is equal to right-hand operand.                 |
+| `!=`     | Left-hand operand is not equal to right-hand operand.             |
 
-<table><thead><tr><th>
-
-Operator
-
-</th><th>
-
-Description
-
-</th></tr></thead><tbody><tr><td>
-
-`<`
-
-</td><td>
-
-Left-hand operand is less than right-operand.
-
-</td></tr><tr><td>
-
-`<=`
-
-</td><td>
-
-Left-hand operand is less than or equal to right-hand operand.
-
-</td></tr><tr><td>
-
-`>`
-
-</td><td>
-
-Left-hand operand is greater than right-hand operand.
-
-</td></tr><tr><td>
-
-`>=`
-
-</td><td>
-
-Left-hand operand is greater than or equal to right-hand operand.
-
-</td></tr><tr><td>
-
-`==`
-
-</td><td>
-
-Left-hand operand is equal to right-hand operand.
-
-</td></tr><tr><td>
-
-`!=`
-
-</td><td>
-
-Left-hand operand is not equal to right-hand operand.
-
-</td></tr><tbody></table>
 As with integers, each operator evaluates to a value of type `int`, which is equal to one if the condition is true or zero if it is false.
 
 The relational operators compare the two input strings byte-by-byte, similarly to the C library routine `strcmp()`. Each byte is compared by using its corresponding integer value in the ASCII character set until a null byte is read or the maximum string length is reached. See the `ascii(7)` manual page for more information. Some example D string comparisons and their results are shown in the following table.
-- 
2.47.3




More information about the DTrace-devel mailing list