package vals

import (
	
	
)

var errIndexNotAtRuneBoundary = errors.New("index not at rune boundary")

func ( string,  interface{}) (string, error) {
	, ,  := convertStringIndex(, )
	if  != nil {
		return "", 
	}
	return [:], nil
}

func ( interface{},  string) (int, int, error) {
	,  := ConvertListIndex(, len())
	if  != nil {
		return 0, 0, 
	}
	if .Slice {
		,  := .Lower, .Upper
		if startsWithRuneBoundary([:]) && endsWithRuneBoundary([:]) {
			return , , nil
		}
		return 0, 0, errIndexNotAtRuneBoundary
	}
	// Not slice
	,  := utf8.DecodeRuneInString([.Lower:])
	if  == utf8.RuneError {
		return 0, 0, errIndexNotAtRuneBoundary
	}
	return .Lower, .Lower + , nil
}

func ( string) bool {
	if  == "" {
		return true
	}
	,  := utf8.DecodeRuneInString()
	return  != utf8.RuneError
}

func ( string) bool {
	if  == "" {
		return true
	}
	,  := utf8.DecodeLastRuneInString()
	return  != utf8.RuneError
}