include/rtl/strbuf.hxx  |    2 +-
 include/rtl/string.hxx  |    3 +--
 include/rtl/ustrbuf.hxx |    3 +--
 include/rtl/ustring.hxx |   15 +++++----------
 4 files changed, 8 insertions(+), 15 deletions(-)

New commits:
commit 2b06b5caeaa336de52746869fa91adfa6895f811
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Aug 22 10:19:15 2022 +0300
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Aug 22 10:40:37 2022 +0200

    Remove NULL-terminated requirement where not applicable
    
    These functions take the string length instead, so may take
    non-NULL-terminated strings.
    
    Change-Id: I21dbfd97adec197ba52ae5f9e01340b44689805b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138658
    Reviewed-by: Stephan Bergmann <[email protected]>
    Tested-by: Jenkins

diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 098e8b0bbc97..5917c1812e9c 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -394,7 +394,7 @@ public:
 
         The capacity
         is the amount of storage available for newly inserted
-        characters. The real buffer size is 2 bytes longer, because
+        characters. The real buffer size is 1 byte longer, because
         all strings are 0 terminated.
 
         @return  the current capacity of this string buffer.
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 837fa89bd2b4..9ae30586e549 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -697,8 +697,7 @@ public:
 
       The result is true if and only if second string
       represents the same sequence of characters as the first string.
-      The ASCII string must be NULL-terminated and must be greater or
-      equal as length.
+      The ASCII string must be greater or equal as length.
       This function can't be used for language specific comparison.
 
 
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 605fb1efb6d0..c5d6b2e9ee1b 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -756,8 +756,7 @@ public:
         Since this method is optimized for performance. the ASCII
         character values are not converted in any way. The caller
         has to make sure that all ASCII characters are in the
-        allowed range between 0 and 127. The ASCII string must be
-        NULL-terminated.
+        allowed range between 0 and 127.
         <p>
         Characters of the character array <code>str</code> are appended,
         in order, to the contents of this string buffer. The length of this
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 79ad75d8304d..8e29742b588d 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1205,8 +1205,7 @@ public:
       Since this method is optimized for performance, the ASCII character
       values are not converted in any way. The caller has to make sure that
       all ASCII characters are in the allowed range between 0 and 127.
-      The ASCII string must be NULL-terminated and must be greater than
-      or equal to asciiStrLength.
+      The ASCII string must be greater than or equal to asciiStrLength.
       This function can't be used for language specific sorting.
 
       @param    asciiStr        the 8-Bit ASCII character string to be 
compared.
@@ -1250,8 +1249,7 @@ public:
       Since this method is optimized for performance, the ASCII character
       values are not converted in any way. The caller has to make sure that
       all ASCII characters are in the allowed range between 0 and 127.
-      The ASCII string must be NULL-terminated and must be greater than
-      or equal to asciiStrLength.
+      The ASCII string must be greater than or equal to asciiStrLength.
       This function can't be used for language specific comparison.
 
       @param    asciiStr         the 8-Bit ASCII character string to be 
compared.
@@ -1325,8 +1323,7 @@ public:
       Since this method is optimized for performance, the ASCII character
       values are not converted in any way. The caller has to make sure that
       all ASCII characters are in the allowed range between 0 and 127.
-      The ASCII string must be NULL-terminated and must be greater than
-      or equal to asciiStrLength.
+      The ASCII string must be greater than or equal to asciiStrLength.
       This function can't be used for language specific comparison.
 
       @param    asciiStr        the 8-Bit ASCII character string to be 
compared.
@@ -1350,8 +1347,7 @@ public:
       Since this method is optimized for performance, the ASCII character
       values are not converted in any way. The caller has to make sure that
       all ASCII characters are in the allowed range between 0 and 127.
-      The ASCII string must be NULL-terminated and must be greater than or
-      equal to asciiStrLength.
+      The ASCII string must be greater than or equal to asciiStrLength.
       This function can't be used for language specific comparison.
 
       @param    asciiStr    the object (substring) to be compared.
@@ -1388,8 +1384,7 @@ public:
       Since this method is optimized for performance, the ASCII character
       values are not converted in any way. The caller has to make sure that
       all ASCII characters are in the allowed range between 0 and 127.
-      The ASCII string must be NULL-terminated and must be greater than or
-      equal to asciiStrLength.
+      The ASCII string must be greater than or equal to asciiStrLength.
       This function can't be used for language specific comparison.
 
       @param    asciiStr        the 8-Bit ASCII character string to be 
compared.

Reply via email to