Text functions
Article
08/04/2022
5 contributors
Feedback
In this article
These functions create and manipulate text values.
Name
Description
Text.InferNumberType
Infers the granular number type (Int64.Type, Double.Type, and so on) of a number encoded in text.
Text.Length
Returns the number of characters in a text value.
Text Comparisons
Name
Description
Character.FromNumber
Returns a number to its character value.
Character.ToNumber
Returns a character to its number value.
Guid.From
Returns a Guid.Type
value from the given value
.
Json.FromValue
Produces a JSON representation of a given value.
Text.From
Returns 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.FromBinary
Decodes data from a binary value in to a text value using an encoding.
Text.NewGuid
Returns a Guid value as a text value.
Text.ToBinary
Encodes a text value into binary value using an encoding.
Text.ToList
Returns a list of characters from a text value.
Value.FromText
Decodes 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.
Name
Description
Text.At
Returns a character starting at a zero-based offset.
Text.Middle
Returns the substring up to a specific length.
Text.Range
Returns a number of characters from a text value starting at a zero-based offset and for count number of characters.
Text.Start
Returns the count of characters from the start of a text value.
Text.End
Returns the number of characters from the end of a text value.
Modification
Name
Description
Text.Insert
Returns a text value with newValue inserted into a text value starting at a zero-based offset.
Text.Remove
Removes 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.RemoveRange
Removes count characters at a zero-based offset from a text value.
Text.Replace
Replaces all occurrences of a substring with a new text value.
Text.ReplaceRange
Replaces length characters in a text value starting at a zero-based offset with the new text value.
Text.Select
Selects all occurrences of the given character or list of characters from the input text value.
Membership
Name
Description
Text.Contains
Returns true if a text value substring was found within a text value string; otherwise, false.
Text.EndsWith
Returns a logical value indicating whether a text value substring was found at the end of a string.
Text.PositionOf
Returns the first occurrence of substring in a string and returns its position starting at startOffset.
Text.PositionOfAny
Returns the first occurrence of a text value in list and returns its position starting at startOffset.
Text.StartsWith
Returns a logical value indicating whether a text value substring was found at the beginning of a string.
Name
Description
Text.AfterDelimiter
Returns the portion of text after the specified delimiter.
Text.BeforeDelimiter
Returns the portion of text before the specified delimiter.
Text.BetweenDelimiters
Returns the portion of text between the specified startDelimiter and endDelimiter.
Text.Clean
Returns the original text value with non-printable characters removed.
Text.Combine
Returns a text value that is the result of joining all text values with each value separated by a separator.
Text.Lower
Returns the lowercase of a text value.
Text.PadEnd
Returns a text value padded at the end with pad to make it at least length characters.
Text.PadStart
Returns 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.Proper
Returns a text value with first letters of all words converted to uppercase.
Text.Repeat
Returns a text value composed of the input text value repeated a number of times.
Text.Reverse
Reverses the provided text.
Text.Split
Returns a list containing parts of a text value that are delimited by a separator text value.
Text.SplitAny
Returns a list containing parts of a text value that are delimited by any separator text values.
Text.Trim
Removes any occurrences of characters in trimChars from text.
Text.TrimEnd
Removes any occurrences of the characters specified in trimChars from the end of the original text value.
Text.TrimStart
Removes any occurrences of the characters in trimChars from the start of the original text value.
Text.Upper
Returns the uppercase of a text value.