func removeLeadingDots(text: String) > String {
mut cnt = 0
for c in text {
if c != "." {
break
}
cnt +: 1
}
out = ""
for mut i = cnt; i < text.length(); i +: 1 {
out +: text[i]
}
return out
}
print(removeLeadingDots("......Flotschi!"))
Notes
This is wired because we don't have a Char datastructure so indexing into a string returns a new string with a single character inside it.
Example
Notes
This is wired because we don't have a Char datastructure so indexing into a string returns a new string with a single character inside it.