Function with multiple parameters



examples/print-substring-function/print_substring_function.go
package main

import (
    "fmt"
)

func main() {
    printSubstring("The black cat climbed the green tree", 10, 13)
}

func printSubstring(text string, start, end int) {
    fmt.Println(text[start:end])
}

examples/print-substring-function/print_substring_function.out
cat