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
Index
type
returns
method
number
Arguments
name
type
description
needle
string
The substring to search for
Explanation
Returns the index of the start of the
substring
in the given string. Returns
-1
if not found.
Examples
"Hello! Hi!"
.
index
(
"Hi"
)
==
7
"Goats :D"
.
index
(
"Hi"
)
==
-
1
Previous
Chunk
Next
Lower
Last modified
3yr ago