Repository navigation
New text functions - #518
Merged
Merged
Conversation
izulin
reviewed
Sep 19, 2020
| | SEARCH | Text | Returns the location of one text string inside another. (Allows the use of wildcards.) | SEARCH( "Text1"; "Text2"[; Number]) | | ||
| | FIND | Text | Returns the location of one text string inside another. | FIND( "Text1"; "Text2"[; Number]) | | ||
| | SPLIT | Text | Divides text around a specified character or string, and puts each fragment into a separate cell in the row. | SPLIT(Text; Delimiter, [Split_by_each], [Remove_empty_text]) | | ||
| | SUBSTITUTE | Text | Returns string where occurrences of Old_text are replaced by New_text. Replaces only specific occurrence if last parameter is provided. | SUBSTITUTE(Text; Old_text; New_text; [Occurrence]) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | SUBSTITUTE | Text | Returns string where occurrences of Old_text are replaced by New_text. Replaces only specific occurrence if last parameter is provided. | SUBSTITUTE(Text; Old_text; New_text; [Occurrence]) | | |
| | SUBSTITUTE | Text | Returns string where occurrences of Old_text are replaced by New_text. Replaces only specific occurrence if last parameter is provided. | SUBSTITUTE(Text; Old_text; New_text[; Occurrence]) | |
izulin
reviewed
Sep 19, 2020
| | LEFT | Text | Extracts a given number of characters from the left side of a text string. | LEFT("Text"; Number) | | ||
| | SEARCH | Text | Returns the location of one text string inside another. (Allows the use of wildcards.) | SEARCH( "Text1"; "Text2"[; Number]) | | ||
| | FIND | Text | Returns the location of one text string inside another. | FIND( "Text1"; "Text2"[; Number]) | | ||
| | SPLIT | Text | Divides text around a specified character or string, and puts each fragment into a separate cell in the row. | SPLIT(Text; Delimiter, [Split_by_each], [Remove_empty_text]) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | SPLIT | Text | Divides text around a specified character or string, and puts each fragment into a separate cell in the row. | SPLIT(Text; Delimiter, [Split_by_each], [Remove_empty_text]) | | |
| | SPLIT | Text | Divides text around a specified character or string, and puts each fragment into a separate cell in the row. | SPLIT(Text; Delimiter[; Split_by_each[; Remove_empty_text]]) | |
izulin
reviewed
Sep 19, 2020
| | LEN | Text | Returns length of a given text. | LEN("Text") | | ||
| | TRIM | Text | Strips extra spaces from text. | TRIM("Text") | | ||
| | LOWER | Text | Returns text converted to lowercase. | LOWER(Text) | | ||
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | | |
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text; Start_position; Length) | |
izulin
reviewed
Sep 19, 2020
| | MIN | Statistical | Returns the minimum value in a list of arguments. | MIN(Number1; Number2; ...Number30) | | ||
| | MINA | Statistical | Returns the minimum value in a list of arguments. | MINA(Value1; Value2; ... Value30) | | ||
| | CHAR | Text | Converts a number into a character according to the current code table. | CHAR(Number) | | ||
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | |
Contributor
There was a problem hiding this comment.
Suggested change
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | | |
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN(Text) | |
izulin
reviewed
Sep 19, 2020
| | SPLIT | Text | Divides text around a specified character or string, and puts each fragment into a separate cell in the row. | SPLIT(Text, Delimiter, [Split_by_each], [Remove_empty_text]) | | ||
| | TEXT | Text | Converts a number into text according to a given format. | TEXT(Number; Format) | | ||
| | EXACT | Text | Returns TRUE if both text strings are exactly the same. | EXACT(Text; Text) | | ||
| | FIND | Text | Returns the location of one text string inside another. | FIND( "Text1"; "Text2"[; Number]) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | FIND | Text | Returns the location of one text string inside another. | FIND( "Text1"; "Text2"[; Number]) | | |
| | FIND | Text | Returns the location of one text string inside another. | FIND( Text1; Text2[; Number]) | |
izulin
reviewed
Sep 19, 2020
| | TEXT | Text | Converts a number into text according to a given format. | TEXT(Number; Format) | | ||
| | EXACT | Text | Returns TRUE if both text strings are exactly the same. | EXACT(Text; Text) | | ||
| | FIND | Text | Returns the location of one text string inside another. | FIND( "Text1"; "Text2"[; Number]) | | ||
| | LEFT | Text | Extracts a given number of characters from the left side of a text string. | LEFT("Text"; Number) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | LEFT | Text | Extracts a given number of characters from the left side of a text string. | LEFT("Text"; Number) | | |
| | LEFT | Text | Extracts a given number of characters from the left side of a text string. | LEFT(Text; Number) | |
izulin
reviewed
Sep 19, 2020
| | SUBSTITUTE | Text | Returns string where occurrences of Old_text are replaced by New_text. Replaces only specific occurrence if last parameter is provided. | SUBSTITUTE(Text; Old_text; New_text; [Occurrence]) | | ||
| | T | Text | Returns text if given value is text, empty string otherwise. | T(Value) | | ||
| | TEXT | Text | Converts a number into text according to a given format. | TEXT(Number; Format) | | ||
| | TRIM | Text | Strips extra spaces from text. | TRIM("Text") | |
Contributor
There was a problem hiding this comment.
Suggested change
| | TRIM | Text | Strips extra spaces from text. | TRIM("Text") | | |
| | TRIM | Text | Strips extra spaces from text. | TRIM(Text) | |
izulin
reviewed
Sep 19, 2020
| | MINA | Statistical | Returns the minimum value in a list of arguments. | MINA(Value1; Value2; ... Value30) | | ||
| | CHAR | Text | Converts a number into a character according to the current code table. | CHAR(Number) | | ||
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | | ||
| | CODE | Text | Returns a numeric code for the first character in a text string. | CODE("Text") | |
Contributor
There was a problem hiding this comment.
Suggested change
| | CODE | Text | Returns a numeric code for the first character in a text string. | CODE("Text") | | |
| | CODE | Text | Returns a numeric code for the first character in a text string. | CODE(Text) | |
izulin
reviewed
Sep 19, 2020
| | CHAR | Text | Converts a number into a character according to the current code table. | CHAR(Number) | | ||
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | | ||
| | CODE | Text | Returns a numeric code for the first character in a text string. | CODE("Text") | | ||
| | CONCATENATE | Text | Combines several text strings into one string. | CONCATENATE("Text1"; ...; "Text30") | |
Contributor
There was a problem hiding this comment.
Suggested change
| | CONCATENATE | Text | Combines several text strings into one string. | CONCATENATE("Text1"; ...; "Text30") | | |
| | CONCATENATE | Text | Combines several text strings into one string. | CONCATENATE(Text1; ...; Text30) | |
izulin
reviewed
Sep 19, 2020
| | LEN | Text | Returns length of a given text. | LEN("Text") | | ||
| | TRIM | Text | Strips extra spaces from text. | TRIM("Text") | | ||
| | LOWER | Text | Returns text converted to lowercase. | LOWER(Text) | | ||
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | | |
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text; Start_position; Length) | |
izulin
reviewed
Sep 19, 2020
| | TRIM | Text | Strips extra spaces from text. | TRIM("Text") | | ||
| | LOWER | Text | Returns text converted to lowercase. | LOWER(Text) | | ||
| | MID | Text | Returns substring of a given length starting from Start_position. | MID(Text, Start_position, Length) | | ||
| | PROPER | Text | Capitalizes words given text string. | PROPER("Text") | |
Contributor
There was a problem hiding this comment.
Suggested change
| | PROPER | Text | Capitalizes words given text string. | PROPER("Text") | | |
| | PROPER | Text | Capitalizes words given text string. | PROPER(Text) | |
izulin
reviewed
Sep 19, 2020
| | PROPER | Text | Capitalizes words given text string. | PROPER("Text") | | ||
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | | ||
| | REPLACE | Text | Replaces substring of a text of a given length that starts at given position. | SUBSTITUTE(Text; Start_position; Length; New_text) | | ||
| | REPT | Text | Repeats text a given number of times. | REPT("Text"; Number) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | REPT | Text | Repeats text a given number of times. | REPT("Text"; Number) | | |
| | REPT | Text | Repeats text a given number of times. | REPT(Text; Number) | |
izulin
reviewed
Sep 19, 2020
| | CLEAN | Text | Returns text that has been "cleaned" of line breaks and other non-printable characters. | CLEAN("Text") | | ||
| | REPLACE | Text | Replaces substring of a text of a given length that starts at given position. | SUBSTITUTE(Text; Start_position; Length; New_text) | | ||
| | REPT | Text | Repeats text a given number of times. | REPT("Text"; Number) | | ||
| | RIGHT | Text | Extracts a given number of characters from the right side of a text string. | RIGHT("Text"; Number) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | RIGHT | Text | Extracts a given number of characters from the right side of a text string. | RIGHT("Text"; Number) | | |
| | RIGHT | Text | Extracts a given number of characters from the right side of a text string. | RIGHT(Text; Number) | |
izulin
reviewed
Sep 19, 2020
| | REPT | Text | Repeats text a given number of times. | REPT("Text"; Number) | | ||
| | RIGHT | Text | Extracts a given number of characters from the right side of a text string. | RIGHT("Text"; Number) | | ||
| | LEFT | Text | Extracts a given number of characters from the left side of a text string. | LEFT("Text"; Number) | | ||
| | SEARCH | Text | Returns the location of one text string inside another. (Allows the use of wildcards.) | SEARCH( "Text1"; "Text2"[; Number]) | |
Contributor
There was a problem hiding this comment.
Suggested change
| | SEARCH | Text | Returns the location of one text string inside another. (Allows the use of wildcards.) | SEARCH( "Text1"; "Text2"[; Number]) | | |
| | SEARCH | Text | Returns the location of one text string inside another. (Allows the use of wildcards.) | SEARCH( Text1; Text2[; Number]) | |
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
| } | ||
|
|
||
| public substitute(ast: ProcedureAst, formulaAddress: SimpleCellAddress): InternalScalarValue { | ||
| return this.runFunction(ast.args, formulaAddress, this.metadata('SUBSTITUTE'), (text: string, oldText: string, newText: string, occurrence: number | undefined) => { |
Contributor
There was a problem hiding this comment.
Suggested change
| return this.runFunction(ast.args, formulaAddress, this.metadata('SUBSTITUTE'), (text: string, oldText: string, newText: string, occurrence: number | undefined) => { | |
| return this.runFunction(ast.args, formulaAddress, this.metadata('SUBSTITUTE'), (text: string, oldText: string, newText: string, occurrence?: number) => { |
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
Co-authored-by: Przemysław Uznański <40573492+izulin@users.noreply.github.com>
Co-authored-by: Przemysław Uznański <40573492+izulin@users.noreply.github.com>
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
izulin
reviewed
Sep 19, 2020
izulin
approved these changes
Sep 19, 2020
Co-authored-by: Przemysław Uznański <40573492+izulin@users.noreply.github.com>
wojciechczerniak
suggested changes
Sep 21, 2020
Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
Closed
wojciechczerniak
self-requested a review
September 23, 2020 10:55
wojciechczerniak
approved these changes
Sep 23, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Introduces 9 text functions:
EXACT,LOWER,UPPER,MID,T,SUBSTITUTE,REPLACE,UNICODE,UNICHARHow has this been tested?
Types of changes
Related issue(s):
Checklist: