You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: util.go
    path of file: ./repos/sealer/vendor/github.com/monochromegane/go-gitignore
    
    the code of the file until where you have to start completion: package gitignore

import (
	"os"
	"strings"
)

func cutN(path string, n int) (string, 
    
func cutLastN(path string, n int) (string, bool) {
	isLast := true
	i := len(path) - 1

	var count int
	for i >= 0 {
		if os.IsPathSeparator(path[i]) {
			count++
			if count >= n {
				isLast = false
				break
			}
		}
		i--
	}
	return path[i+1:], isLast
}