Strings / Find string in another string / Essentia

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "fmt" "strings" ) func main() { s := "first is, second is, third is" toFind := "is" currStart := 0 for { idx := strings.Index(s, toFind) if idx == -1 { break } fmt.Printf("found '%s' at position %d\n", toFind, currStart+idx) currStart += idx + len(toFind) s = s[idx+len(toFind):] } }
Editor Settings
Theme
Key bindings
Full width
Lines