gitlab.com/evatix-go/core@v1.3.55/coreutils/stringutil/IsStartsAndEndsChar.go (about) 1 package stringutil 2 3 // IsStartsAndEndsChar case sensitive term 4 func IsStartsAndEndsChar( 5 content string, 6 startsWith, endsWith byte, 7 ) bool { 8 length := len(content) 9 10 if length == 0 { 11 return false 12 } 13 14 return content[0] == startsWith && 15 content[length-1] == endsWith 16 17 }