source/text/scalc/01/func_textafter.xhp  |    1 +
 source/text/scalc/01/func_textbefore.xhp |    2 ++
 2 files changed, 3 insertions(+)

New commits:
commit 3424d4be047187502fd5758c697b700f638c97ea
Author:     Olivier Hallot <[email protected]>
AuthorDate: Sun Jul 12 20:54:31 2026 -0300
Commit:     Olivier Hallot <[email protected]>
CommitDate: Mon Jul 13 11:08:07 2026 +0200

    Add precision on "Match End" in TEXTAFTER and TEXTBEFORE
    
    Change-Id: Ie7248f43c986549a85ab187aa8f122c390444667
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/207998
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <[email protected]>

diff --git a/source/text/scalc/01/func_textafter.xhp 
b/source/text/scalc/01/func_textafter.xhp
index e8fcd70d51..110bad1f8b 100644
--- a/source/text/scalc/01/func_textafter.xhp
+++ b/source/text/scalc/01/func_textafter.xhp
@@ -36,6 +36,7 @@
 <embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
 <paragraph role="paragraph" id="par_id21747067698384"><input>=TEXTAFTER("To be 
or not to be";"or ";1;0;0;"@@@")</input> returns the string "not to be", taking 
after the delimiter "or ".</paragraph>
 <paragraph role="paragraph" id="par_id971747068062071"><input>=TEXTAFTER("To 
be or not to be";"question";1;0;0;"@@@")</input> returns the text "@@@" because 
the delimiter "question" is not in the source text.</paragraph>
+<paragraph role="paragraph" id="par_id821783899126651"><input>=TEXTAFTER("To 
be or not to be";"question";1;0;1;"@@@")</input> returns the empty string "" 
because the delimiter "question" is not in the source text and <emph>Match 
End</emph> is 1, which prevents the function to return the error 
<emph>#N/A</emph> or the value defined in <emph>If Not Found</emph>.</paragraph>
 <embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/>
 <embed href="text/scalc/00/avail_release.xhp#25.8"/>
 <embed href="text/scalc/01/common_func.xhp#notODFF"/>
diff --git a/source/text/scalc/01/func_textbefore.xhp 
b/source/text/scalc/01/func_textbefore.xhp
index 0bf2dd448a..9ab25ffa29 100644
--- a/source/text/scalc/01/func_textbefore.xhp
+++ b/source/text/scalc/01/func_textbefore.xhp
@@ -36,6 +36,8 @@
 <embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
 <paragraph role="paragraph" id="par_id21747067698384"><input>=TEXTBEFORE("To 
be or not to be";" be";2;0;0;"@@@")</input> returns the string "To be or not 
to", taking up to  the second instance of the delimiter " be".</paragraph>
 <paragraph role="paragraph" id="par_id971747068062071"><input>=TEXTBEFORE("To 
be or not to be";"question";1;0;0;"@@@")</input> returns the text "@@@" because 
the delimiter "question" is not in the source text.</paragraph>
+<paragraph role="paragraph" id="par_id981783899519114"><input>=TEXTBEFORE("To 
be or not to be";"question";1;0;1;"@@@")</input> returns the text "To be or not 
to be" because the delimiter "question" is not in the source text and 
<emph>Match End</emph> is 1, which then returns everything before the end of 
text.</paragraph>
+<paragraph role="paragraph" id="par_id251783900078219"><input>=TEXTBEFORE("To 
be or not to be";"question";-1;0;1;"@@@")</input> returns the empty string "" 
because the delimiter "question" is not in the source text, <emph>Instance 
Number</emph> is negative (starts from the end) and <emph>Match End</emph> is 
1, which prevents the function to return the error <emph>#N/A</emph> or the 
value defined in <emph>If Not Found</emph>.</paragraph>
 <embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/>
 <embed href="text/scalc/00/avail_release.xhp#25.8"/>
 <embed href="text/scalc/01/common_func.xhp#notODFF"/>

Reply via email to