Table of contents
TOC
Collapse the table of content
Expand the table of content

Text functions

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

Text

Information

FunctionDescription
Text.LengthReturns the number of characters in a text value.

Text Comparisons

FunctionDescription
Character.FromNumberReturns a number to its character value.
Character.ToNumberReturns a character to its number value.
Guid.FromReturns a Guid.Type value from the given value.
Json.FromValueProduces a JSON representation of a given value.
Text.FromReturns the text representation of a number, date, time, datetime, datetimezone, logical, duration or binary value. If a value is null, Text.From returns null. The optional culture parameter is used to format the text value according to the given culture.
Text.FromBinaryDecodes data from a binary value in to a text value using an encoding.
Text.NewGuidReturns a Guid value as a text value.
Text.ToBinaryEncodes a text value into binary value using an encoding.
Text.ToListReturns a list of characters from a text value.
Value.FromTextDecodes a value from a textual representation, value, and interprets it as a value with an appropriate type. Value.FromText takes a text value and returns a number, a logical value, a null value, a DateTime value, a Duration value, or a text value. The empty text value is interpreted as a null value.

Extraction

FunctionDescription
Text.AtReturns a character starting at a zero-based offset.
Text.MiddleReturns the substring up to a specific length.
Text.RangeReturns a number of characters from a text value starting at a zero-based offset and for count number of characters.
Text.StartReturns the count of characters from the start of a text value.
FunctionDescription
Text.EndReturns the number of characters from the end of a text value.

Modification

FunctionDescription
Text.InsertReturns a text value with newValue inserted into a text value starting at a zero-based offset.
Text.RemoveRemoves all occurrences of a character or list of characters from a text value. The removeChars parameter can be a character value or a list of character values.
Text.RemoveRangeRemoves count characters at a zero-based offset from a text value.
Text.ReplaceReplaces all occurrences of a substring with a new text value.
Text.ReplaceRangeReplaces length characters in a text value starting at a zero-based offset with the new text value.
Text.SelectSelects all occurrences of the given character or list of characters from the input text value.

Membership

FunctionDescription
Text.ContainsReturns true if a text value substring was found within a text value string; otherwise, false.
Text.EndsWithReturns a logical value indicating whether a text value substring was found at the end of a string.
Text.PositionOfReturns the first occurrence of substring in a string and returns its position starting at startOffset.
Text.PositionOfAnyReturns the first occurrence of a text value in list and returns its position starting at startOffset.
Text.StartsWithReturns a logical value indicating whether a text value substring was found at the beginning of a string.

Transformations

FunctionDescription
Text.AfterDelimiterReturns the portion of text after the specified delimiter.
Text.BeforeDelimiterReturns the portion of text before the specified delimiter.
Text.BetweenDelimitersReturns the portion of text between the specified startDelimiter and endDelimiter.
Text.CleanReturns the original text value with non-printable characters removed.
Text.CombineReturns a text value that is the result of joining all text values with each value separated by a separator.
Text.LowerReturns the lowercase of a text value.
Text.PadEndReturns a text value padded at the end with pad to make it at least length characters.
Text.PadStartReturns a text value padded at the beginning with pad to make it at least length characters. If pad is not specified, whitespace is used as pad.
Text.ProperReturns a text value with first letters of all words converted to uppercase.
Text.RepeatReturns a text value composed of the input text value repeated a number of times.
Text.ReverseReverses the provided text.
Text.SplitReturns a list containing parts of a text value that are delimited by a separator text value.
Text.SplitAnyReturns a list containing parts of a text value that are delimited by any separator text values.
Text.TrimRemoves any occurrences of characters in trimChars from text.
Text.TrimEndRemoves any occurrences of the characters specified in trimChars from the end of the original text value.
Text.TrimStartRemoves any occurrences of the characters in trimChars from the start of the original text value.
Text.UpperReturns the uppercase of a text value.

Parameters

Parameter valuesDescription
Occurrence.AllA list of positions of all occurrences of the found values is returned.
Occurrence.FirstThe position of the first occurrence of the found value is returned.
Occurrence.LastThe position of the last occurrence of the found value is returned.
RelativePosition.FromEndIndicates indexing should be done from the end of the input.
RelativePosition.FromStartIndicates indexing should be done from the start of the input.
TextEncoding.AsciiUse to choose the ASCII binary form.
TextEncoding.BigEndianUnicodeUse to choose the UTF16 big endian binary form.
TextEncoding.UnicodeUse to choose the UTF16 little endian binary form.
TextEncoding.Utf8Use to choose the UTF8 binary form.
TextEncoding.Utf16Use to choose the UTF16 little endian binary form.
TextEncoding.WindowsUse to choose the Windows binary form.
© 2018 Microsoft