[Libreoffice-commits] help.git: source/text

Olivier Hallot (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 29 12:59:06 UTC 2020


 source/text/sbasic/shared/replace.xhp |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 45bb570b11740cfca92aebe35ed016916c9ce2d5
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Fri Apr 24 22:47:55 2020 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Wed Apr 29 14:58:47 2020 +0200

    tdf#132390 Correction for replace() Basic function
    
    Change-Id: I7f7f0c45ad91a5614fda38b01d3d90968b835a9d
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/92885
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/source/text/sbasic/shared/replace.xhp b/source/text/sbasic/shared/replace.xhp
index ee17e0fd1..7f4e825f1 100644
--- a/source/text/sbasic/shared/replace.xhp
+++ b/source/text/sbasic/shared/replace.xhp
@@ -25,7 +25,7 @@
     </section>
 
     <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
-    <paragraph role="code" id="par_id931552552227310">Replace (Text As String, SearchStr As String, ReplStr As String [, Start As Long [, Count as long [, Compare As Boolean]]]</paragraph>
+    <paragraph role="code" id="par_id931552552227310">Replace (Text As String, SearchStr As String, ReplStr As String [, Start As Long [, Count as Long [, Compare As Boolean]]]</paragraph>
 
     <embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
     <paragraph role="paragraph" id="par_id911552552252024">String</paragraph>
@@ -34,7 +34,7 @@
     <paragraph role="paragraph" id="par_id721552552263062"><emph>Text:</emph> Any string expression that you want to modify.</paragraph>
     <paragraph role="paragraph" id="par_id901552552269836"><emph>SearchStr:</emph> Any string expression that shall be searched for.</paragraph>
     <paragraph role="paragraph" id="par_id791552552275383"><emph>ReplStr:</emph> Any string expression that shall replace the found search string.</paragraph>
-    <paragraph role="paragraph" id="par_id111552552283060"><emph>Start:</emph> Numeric expression that indicates the character position within the string where the search shall begin. The maximum allowed value is 65535.</paragraph>
+    <paragraph role="paragraph" id="par_id111552552283060"><emph>Start:</emph> Numeric expression that indicates the character position where the search starts and also the start of the substring to be returned.</paragraph>
     <paragraph role="paragraph" id="par_id921552552289833"><emph>Count:</emph> The maximal number of times the replace shall be performed.</paragraph>
     <paragraph role="paragraph" id="par_id891552552302894"><emph>Compare:</emph> Optional boolean expression that defines the type of comparison. The value of this parameter can be TRUE or FALSE. The default value of TRUE specifies a text comparison that is not case-sensitive. The value of FALSE specifies a binary comparison that is case-sensitive. You can as well use 0 instead of FALSE or 1 instead of TRUE.</paragraph>
 
@@ -47,6 +47,8 @@
         <paragraph role="bascode" id="par_id321552552440672" >REM meaning: "b" should be replaced, but</paragraph>
         <paragraph role="bascode" id="par_id571552552467647">REM * only when lowercase (parameter 6), hence second occurrence of "b"</paragraph>
         <paragraph role="bascode" id="par_id71552552474769">REM * only first (respecting case) occurrence (parameter 5)</paragraph>
+        <paragraph role="bascode" id="par_id501587778372566" xml-lang="en-US" localize="false">msgbox replace ("ABCDEFGHI", "E", "*", 4)</paragraph>
+        <paragraph role="bascode" id="par_id861587778446685" xml-lang="en-US">REM returns D*FGHI because the search starts at position 4, which is also the start of the returned string.</paragraph>
     </bascode>
 </body>
 </helpdocument>


More information about the Libreoffice-commits mailing list