This function splits a string into chunks of specified size.
Different from toChunks, this function reverses the order of the chunks,
which means the first chunk will contain the last characters of the string,
when the input string is not a multiple of the chunk size,
Parameters
text: string
The string to be split into chunks.
chunkSize: number
The size of each chunk. Must be a positive integer.
Returns string[]
An array of strings, each representing a chunk of the original string.
Throws
RangeError if the chunk size is not a positive integer.
This function splits a string into chunks of specified size. Different from
toChunks
, this function reverses the order of the chunks, which means the first chunk will contain the last characters of the string, when the input string is not a multiple of the chunk size,