From 3b6506e4e1b6b4dd41f4e5e8fda8315426c57d9c Mon Sep 17 00:00:00 2001 From: Pierre F Date: Fri, 1 Nov 2024 16:39:06 +0200 Subject: tdf#143846 split PROPER REPLACE REPT RIGHT SEARCH ... ... SUBSTITUTE T TEXT TRIM UNICHAR UNICODE UPPER Change-Id: I2ef1a659fbaf481dac1329f86178b8cd9b786ce2 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/175912 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- source/text/scalc/01/04060110.xhp | 236 ++----------------------------- source/text/scalc/01/func_proper.xhp | 38 +++++ source/text/scalc/01/func_replace.xhp | 40 ++++++ source/text/scalc/01/func_rept.xhp | 40 ++++++ source/text/scalc/01/func_right.xhp | 39 +++++ source/text/scalc/01/func_search.xhp | 39 +++++ source/text/scalc/01/func_substitute.xhp | 42 ++++++ source/text/scalc/01/func_t.xhp | 40 ++++++ source/text/scalc/01/func_text.xhp | 42 ++++++ source/text/scalc/01/func_trim.xhp | 38 +++++ source/text/scalc/01/func_unichar.xhp | 40 ++++++ source/text/scalc/01/func_unicode.xhp | 40 ++++++ source/text/scalc/01/func_upper.xhp | 38 +++++ 13 files changed, 488 insertions(+), 224 deletions(-) create mode 100644 source/text/scalc/01/func_proper.xhp create mode 100644 source/text/scalc/01/func_replace.xhp create mode 100644 source/text/scalc/01/func_rept.xhp create mode 100644 source/text/scalc/01/func_right.xhp create mode 100644 source/text/scalc/01/func_search.xhp create mode 100644 source/text/scalc/01/func_substitute.xhp create mode 100644 source/text/scalc/01/func_t.xhp create mode 100644 source/text/scalc/01/func_text.xhp create mode 100644 source/text/scalc/01/func_trim.xhp create mode 100644 source/text/scalc/01/func_unichar.xhp create mode 100644 source/text/scalc/01/func_unicode.xhp create mode 100644 source/text/scalc/01/func_upper.xhp (limited to 'source/text/scalc') diff --git a/source/text/scalc/01/04060110.xhp b/source/text/scalc/01/04060110.xhp index 57881fb3b5..fb03ee3956 100644 --- a/source/text/scalc/01/04060110.xhp +++ b/source/text/scalc/01/04060110.xhp @@ -221,88 +221,17 @@ =MIDB("office";2;3) returns "ffi" (byte position 2 is at the beginning of a character in a non-DBCS string, and 3 bytes of a non-DBCS string constitute 3 characters). -
- - PROPER function - - - - -

PROPER

-Capitalizes the first letter in all words of a text string. - - -PROPER("Text") - Text refers to the text to be converted. - - - =PROPER("the document foundation") returns The Document Foundation. -
+
-
- - REPLACE function - - - - -

REPLACE

-Replaces part of a text string with a different text string. This function can be used to replace both characters and numbers (which are automatically converted to text). The result of the function is always displayed as text. If you intend to perform further calculations with a number which has been replaced by text, you will need to convert it back to a number using the VALUE function. -Any text containing numbers must be enclosed in quotation marks if you do not want it to be interpreted as a number and automatically converted to text. - - -REPLACE("Text"; Position; Length; "NewText") - Text refers to text of which a part will be replaced. - Position refers to the position within the text where the replacement will begin. - Length is the number of characters in Text to be replaced. - NewText refers to the text which replaces Text. - - - =REPLACE("1234567";1;1;"444") returns "444234567". One character at position 1 is replaced by the complete NewText. -
- -
- - REPT function - - - - -

REPT

-Repeats a character string by the given number of copies. - - -REPT("Text"; Number) - Text is the text to be repeated. - Number is the number of repetitions. - - - =REPT("Good morning";2) returns Good morningGood morning. - -Refer to the REPT wiki page for more details about this function.
- - +
@@ -331,162 +260,21 @@
- - -
- - SUBSTITUTE function - - - - -

SUBSTITUTE

-Substitutes new text for old text in a string. - - -SUBSTITUTE("Text"; "SearchText"; "NewText" [; Occurrence]) - Text is the text in which text segments are to be exchanged. - SearchText is the text segment that is to be replaced (a number of times). - NewText is the text that is to replace the text segment. - Occurrence (optional) indicates which occurrence of the search text is to be replaced. If this parameter is missing the search text is replaced throughout. - - - =SUBSTITUTE("123123123";"3";"abc") returns 12abc12abc12abc. - =SUBSTITUTE("123123123";"3";"abc";2) returns 12312abc123. -
- -
- - T function - - - - -

T

-This function returns the target text, or a blank text string if the target is not text. -If an error occurs the function returns the error value. - - -T(Value) -If Value is a text string or refers to a text string, T returns that text string; otherwise it returns a blank text string. - - - =T(12345) returns an empty string. - =T("12345") returns the string 12345. -
- -
- - TEXT function - - - - -

TEXT

-Converts a value into text according to a given format. - - -TEXT(Value; Format) - Value is the value (numerical or textual) to be converted. - Format is the text which defines the format. Use decimal and thousands separators according to the language set in the cell format. - - - =TEXT(12.34567;"###.##") returns the text 12.35 - =TEXT(12.34567;"000.00") returns the text 012.35 - =TEXT("xyz";"=== @ ===") returns the text === xyz === - -See also Number format codes: custom format codes defined by the user. -
- -
- - TRIM function - - - - -

TRIM

-Removes spaces from a string, leaving only a single space character between words. - - -TRIM("Text") - Text refers to text in which spaces are to be removed. - - - =TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between words. -
- -
- - - UNICHAR function - - - -

UNICHAR

-Converts a code number into a Unicode character or letter. - - -UNICHAR(number) - - -=UNICHAR(169) returns the Copyright character ©. -See also the UNICODE() function. -
- -
- - - UNICODE function - - - -

UNICODE

-Returns the numeric code for the first Unicode character in a text string. + - -UNICODE("Text") +
- -=UNICODE("©") returns the Unicode number 169 for the Copyright character. -See also the UNICHAR() function. -
+
-
- - UPPER function - +
- +
-

UPPER

-Converts the string specified in the text field to uppercase. +
- -UPPER("Text") - Text refers to the lower case letters you want to convert to upper case. +
- - =UPPER("Good Morning") returns GOOD MORNING. -
+
diff --git a/source/text/scalc/01/func_proper.xhp b/source/text/scalc/01/func_proper.xhp new file mode 100644 index 0000000000..13b5ded0c0 --- /dev/null +++ b/source/text/scalc/01/func_proper.xhp @@ -0,0 +1,38 @@ + + + + + + PROPER Function + /text/scalc/01/func_proper.xhp + + + + + PROPER function + + +
+

+ + PROPER + +

+ + Capitalizes the first letter in all words of a text string. + +
+ + PROPER("Text") + Text refers to the text to be converted. + + =PROPER("the document foundation") returns The Document Foundation. + +
diff --git a/source/text/scalc/01/func_replace.xhp b/source/text/scalc/01/func_replace.xhp new file mode 100644 index 0000000000..bd039f80a0 --- /dev/null +++ b/source/text/scalc/01/func_replace.xhp @@ -0,0 +1,40 @@ + + + + + + REPLACE Function + /text/scalc/01/func_replace.xhp + + + + + REPLACE function + + +
+

+ + REPLACE + +

+ Replaces part of a text string with a different text string. This function can be used to replace both characters and numbers (which are automatically converted to text). The result of the function is always displayed as text. If you intend to perform further calculations with a number which has been replaced by text, you will need to convert it back to a number using the VALUE function. +
+ Any text containing numbers must be enclosed in quotation marks if you do not want it to be interpreted as a number and automatically converted to text. + + REPLACE("Text"; Position; Length; "NewText") + Text refers to text of which a part will be replaced. + Position refers to the position within the text where the replacement will begin. + Length is the number of characters in Text to be replaced. + NewText refers to the text which replaces Text. + + =REPLACE("1234567";1;1;"444") returns "444234567". One character at position 1 is replaced by the complete NewText. + +
diff --git a/source/text/scalc/01/func_rept.xhp b/source/text/scalc/01/func_rept.xhp new file mode 100644 index 0000000000..70c220eeaa --- /dev/null +++ b/source/text/scalc/01/func_rept.xhp @@ -0,0 +1,40 @@ + + + + + + REPT Function + /text/scalc/01/func_rept.xhp + + + + + REPT function + + +
+

+ + REPT + +

+ + Repeats a character string by the given number of copies. + +
+ + REPT("Text"; Number) + Text is the text to be repeated. + Number is the number of repetitions. + + =REPT("Good morning";2) returns Good morningGood morning. + Refer to the REPT wiki page for more details about this function. + +
diff --git a/source/text/scalc/01/func_right.xhp b/source/text/scalc/01/func_right.xhp new file mode 100644 index 0000000000..4d94225118 --- /dev/null +++ b/source/text/scalc/01/func_right.xhp @@ -0,0 +1,39 @@ + + + + + + RIGHT Function + /text/scalc/01/func_right.xhp + + + + + RIGHT function + + +
+

+ + RIGHT + +

+ + Returns the last character or characters of a text. + +
+ + RIGHT("Text" [; Number]) + Text is the text of which the right part is to be determined. + Number (optional) is the number of characters from the right part of the text. If this parameter is not defined, one character is returned. + + =RIGHT("Sun";2) returns un. + +
diff --git a/source/text/scalc/01/func_search.xhp b/source/text/scalc/01/func_search.xhp new file mode 100644 index 0000000000..4bcc4bbf38 --- /dev/null +++ b/source/text/scalc/01/func_search.xhp @@ -0,0 +1,39 @@ + + + + + + SEARCH Function + /text/scalc/01/func_search.xhp + + + + + SEARCH function + + + + + + SEARCH("FindText"; "Text" [; Position]) + FindText is the text to be searched for. + Text is the text where the search will take place. + Position (optional) is the position in the text where the search is to start. + + =SEARCH(54;998877665544) returns 10. + + diff --git a/source/text/scalc/01/func_substitute.xhp b/source/text/scalc/01/func_substitute.xhp new file mode 100644 index 0000000000..14e6a1daf3 --- /dev/null +++ b/source/text/scalc/01/func_substitute.xhp @@ -0,0 +1,42 @@ + + + + + + SUBSTITUTE Function + /text/scalc/01/func_substitute.xhp + + + + + SUBSTITUTE function + + +
+

+ + SUBSTITUTE + +

+ + Substitutes new text for old text in a string. + +
+ + SUBSTITUTE("Text"; "SearchText"; "NewText" [; Occurrence]) + Text is the text in which text segments are to be exchanged. + SearchText is the text segment that is to be replaced (a number of times). + NewText is the text that is to replace the text segment. + Occurrence (optional) indicates which occurrence of the search text is to be replaced. If this parameter is missing the search text is replaced throughout. + + =SUBSTITUTE("123123123";"3";"abc") returns 12abc12abc12abc. + =SUBSTITUTE("123123123";"3";"abc";2) returns 12312abc123. + +
diff --git a/source/text/scalc/01/func_t.xhp b/source/text/scalc/01/func_t.xhp new file mode 100644 index 0000000000..bfd369c5d4 --- /dev/null +++ b/source/text/scalc/01/func_t.xhp @@ -0,0 +1,40 @@ + + + + + + T Function + /text/scalc/01/func_t.xhp + + + + + T function + + +
+

+ + T + +

+ + This function returns the target text, or a blank text string if the target is not text. + +
+ If an error occurs the function returns the error value. + + T(Value) + If Value is a text string or refers to a text string, T returns that text string; otherwise it returns a blank text string. + + =T(12345) returns an empty string. + =T("12345") returns the string 12345. + +
diff --git a/source/text/scalc/01/func_text.xhp b/source/text/scalc/01/func_text.xhp new file mode 100644 index 0000000000..f4d5daf969 --- /dev/null +++ b/source/text/scalc/01/func_text.xhp @@ -0,0 +1,42 @@ + + + + + + TEXT Function + /text/scalc/01/func_text.xhp + + + + + TEXT function + + +
+

+ + TEXT + +

+ + Converts a value into text according to a given format. + +
+ + TEXT(Value; Format) + Value is the value (numerical or textual) to be converted. + Format is the text which defines the format. Use decimal and thousands separators according to the language set in the cell format. + + =TEXT(12.34567;"###.##") returns the text 12.35 + =TEXT(12.34567;"000.00") returns the text 012.35 + =TEXT("xyz";"=== @ ===") returns the text === xyz === + See also Number format codes: custom format codes defined by the user. + +
diff --git a/source/text/scalc/01/func_trim.xhp b/source/text/scalc/01/func_trim.xhp new file mode 100644 index 0000000000..9f69efa813 --- /dev/null +++ b/source/text/scalc/01/func_trim.xhp @@ -0,0 +1,38 @@ + + + + + + TRIM Function + /text/scalc/01/func_trim.xhp + + + + + TRIM function + + +
+

+ + TRIM + +

+ + Removes spaces from a string, leaving only a single space character between words. + +
+ + TRIM("Text") + Text refers to text in which spaces are to be removed. + + =TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between words. + +
diff --git a/source/text/scalc/01/func_unichar.xhp b/source/text/scalc/01/func_unichar.xhp new file mode 100644 index 0000000000..51893f7623 --- /dev/null +++ b/source/text/scalc/01/func_unichar.xhp @@ -0,0 +1,40 @@ + + + + + + UNICHAR Function + /text/scalc/01/func_unichar.xhp + + + + + + UNICHAR function + +
+

+ + UNICHAR + +

+ + Converts a code number into a Unicode character or letter. + +
+ + + UNICHAR(number) + + + =UNICHAR(169) returns the Copyright character ©. + See also the UNICODE() function. + +
diff --git a/source/text/scalc/01/func_unicode.xhp b/source/text/scalc/01/func_unicode.xhp new file mode 100644 index 0000000000..b118a2637a --- /dev/null +++ b/source/text/scalc/01/func_unicode.xhp @@ -0,0 +1,40 @@ + + + + + + UNICODE Function + /text/scalc/01/func_unicode.xhp + + + + + + UNICODE function + +
+

+ + UNICODE + +

+ + Returns the numeric code for the first Unicode character in a text string. + +
+ + + UNICODE("Text") + + + =UNICODE("©") returns the Unicode number 169 for the Copyright character. + See also the UNICHAR() function. + +
diff --git a/source/text/scalc/01/func_upper.xhp b/source/text/scalc/01/func_upper.xhp new file mode 100644 index 0000000000..15fd132ca9 --- /dev/null +++ b/source/text/scalc/01/func_upper.xhp @@ -0,0 +1,38 @@ + + + + + + UPPER Function + /text/scalc/01/func_upper.xhp + + + + + UPPER function + + +
+

+ + UPPER + +

+ + Converts the string specified in the text field to uppercase. + +
+ + UPPER("Text") + Text refers to the lower case letters you want to convert to upper case. + + =UPPER("Good Morning") returns GOOD MORNING. + +
-- cgit