Splitter.SplitTextByRepeatedLengths
This function will return a new function that breaks down a piece of text into smaller segments, each segment being the specified length, and then arranges these segments into a list.
Splitter.SplitTextByRepeatedLengths(length as number, optional startAtEnd as nullable logical) as function
This function will return a new function that breaks down a piece of text into smaller segments, each segment being the specified length, and then arranges these segments into a list.
Example 1
Consecutively divide the given input into groups of three characters each, beginning from the start of the input string.
Syntax:
Power Query MSplitter.SplitTextByRepeatedLengths(3)("12345678")
Output:
{"123", "456", "78"}
Example 2
Consecutively divide the provided input into groups of three characters each, starting from the end of the input string.
Syntax:
Power Query M
let
startAtEnd = true
in
Splitter.SplitTextByRepeatedLengths(3, startAtEnd)("87654321")
Output:
{"87", "654", "321"}