public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH v2 13/20] doc: Clean up the table for string relational operators
Date: Tue, 21 Oct 2025 23:22:43 -0400	[thread overview]
Message-ID: <20251022032251.2010-8-eugene.loh@oracle.com> (raw)
In-Reply-To: <20251022032251.2010-1-eugene.loh@oracle.com>

From: Eugene Loh <eugene.loh@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@oracle.com>
---
 .../dtrace-ref-DTraceSupportforStrings.md     | 73 ++++---------------
 1 file changed, 14 insertions(+), 59 deletions(-)

diff --git a/doc/userguide/reference/dtrace-ref-DTraceSupportforStrings.md b/doc/userguide/reference/dtrace-ref-DTraceSupportforStrings.md
index ea44523ed..e9239026f 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 <a id="dt_strcomp_dlang">
 
-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](dtrace-ref-DTraceSupportforStrings.md#dt_strasg_dlang) 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.
@@ -179,4 +135,3 @@ Returns 0 \(false\)
 **Note:**
 
 Identical Unicode strings might compare as being different if one or the other of the strings isn't normalized.
-
-- 
2.47.3


  parent reply	other threads:[~2025-10-22  3:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22  3:22 [PATCH v2 05/20] doc: Replace duplicate id eugene.loh
2025-10-22  3:22 ` [PATCH v2 06/20] doc: Clean up dangling anchor links eugene.loh
2025-10-23 19:53   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 08/20] doc: Fix anchor links for built-in variables eugene.loh
2025-10-23 19:26   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 09/20] doc: Fix anchor links for providers eugene.loh
2025-10-23 19:27   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 10/20] doc: Fix anchor links for explanation/ eugene.loh
2025-10-23 19:27   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 11/20] doc: Fix anchor links for how-to/ eugene.loh
2025-10-23 19:28   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 12/20] doc: Fix anchor links for reference/ eugene.loh
2025-10-23 19:28   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` eugene.loh [this message]
2025-10-23 19:30   ` [DTrace-devel] [PATCH v2 13/20] doc: Clean up the table for string relational operators Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 14/20] doc: Link to "Character Escape Sequences" table eugene.loh
2025-10-23 19:32   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 15/20] doc: Clean up profile unit table eugene.loh
2025-10-23 19:33   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 16/20] doc: Clean up undefined anchor links eugene.loh
2025-10-23 19:34   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 17/20] doc: Add IP provider documentation eugene.loh
2025-10-22  3:22 ` [PATCH v2 18/20] doc: Add TCP " eugene.loh
2025-10-22  3:22 ` [PATCH v2 19/20] doc: Add UDP " eugene.loh
2025-10-22  3:22 ` [PATCH v2 20/20] doc: Add rawfbt " eugene.loh
2025-10-22  3:22 ` [PATCH 21/20] doc: Add blank line before section head so it is recognized eugene.loh
2025-10-23 19:35   ` [DTrace-devel] " Elena Zannoni
2025-10-23 19:23 ` [PATCH v2 05/20] doc: Replace duplicate id Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251022032251.2010-8-eugene.loh@oracle.com \
    --to=eugene.loh@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox