Cheddar Documentation
Search
⌃
K
Cheddar Documentation
Search
⌃
K
Introduction
Syntax
Literals
Mathematics
Variables
Functions
Default Operators
Control Flow
Standard Library
String
Bytes
Count
Length
Match
Slice
Tail
Chars
Head
Lines
Ord
Split
Test
Chunk
Index
Lower
Reverse
Substitute
Upper
Developing
Powered By
GitBook
Chunk
type
returns
Method
array<string>
Arguments
name
type
description
size
int
Size of each chunk in resulting array
Explanation
Splits the given string into substrings of the given size.
Examples
"1234"
.
chunk
(
2
)
==
[
"12"
,
"34"
]
"Hello"
.
chunk
(
3
)
==
[
"Hel"
,
"lo"
]
Previous
Test
Next
Index
Last modified
3yr ago