From 44939e5de1b37ccd85ef31268219c5866bd3ee3f Mon Sep 17 00:00:00 2001 From: secp512k2 <187356958+secp512k2@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:05:14 -0800 Subject: [PATCH] doc: Fix word order in developer-notes.md This pull request fixes a word order error in developer-notes.md. Before: "In cases where do you call .c_str(), you might want to additionally check that the string does not contain embedded '\0' characters..." After: "In cases where you do call .c_str(), you might want to additionally check that the string does not contain embedded '\0' characters..." Explanation: The sentence had incorrect word order, making it grammatically incorrect. Rearranging "do you" to "you do" corrects the sentence, improving the readability and clarity of the documentation. --- doc/developer-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 0dd15feaa94..37e594e7628 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -959,7 +959,7 @@ Strings and formatting - *Rationale*: Qt has built-in functionality for converting their string type from/to C++. No need to roll your own. - - In cases where do you call `.c_str()`, you might want to additionally check that the string does not contain embedded '\0' characters, because + - In cases where you do call `.c_str()`, you might want to additionally check that the string does not contain embedded '\0' characters, because it will (necessarily) truncate the string. This might be used to hide parts of the string from logging or to circumvent checks. If a use of strings is sensitive to this, take care to check the string for embedded NULL characters first and reject it if there are any (see `ParsePrechecks` in `strencodings.cpp` for an example).