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
Head
type
returns
method
string
Arguments
name
type
description
size
int
the amount of characters to grab
Explanation
Returns a substring of the given size, starting at the string's first index. Roughly equivilent to
#slice(0, size)
Examples
"Hello, World"
.
head
(
5
)
==
"Hello"
"Hi"
.
head
(
3
)
==
"Hi"
Previous
Chars
Next
Lines
Last modified
3yr ago