Copy-paste fix pattern
fn main() {
string name = "ClosedBit"
u256 at = 0
if (at < len(name)) {
println(name[at])
}
}
ClosedBit Docs
ClosedBit error docs
String index out of range. The program tried to read a character outside the string.
The program tried to read a character outside the string.
Check string length before indexing, or use substring with a validated start and count.
fn main() {
string name = "ClosedBit"
u256 at = 0
if (at < len(name)) {
println(name[at])
}
}