programing tip

Go로 시작하는 기능이 없습니까?

itbloger 2020. 6. 24. 07:46
반응형

Go로 시작하는 기능이 없습니까?


Go 궁금한 점은 Go 프로그래밍 언어의 표준 라이브러리의 일부로 startswith, endswith 등과 같은 표준 함수가없는 이유는 무엇입니까?


문자열 패키지가 포함 HasPrefixHasSuffix을 .

import "strings"

startsWith := strings.HasPrefix("prefix", "pre") // true
endsWith := strings.HasSuffix("suffix", "fix") // true

play.golang.org

참고 URL : https://stackoverflow.com/questions/13244048/no-startswith-endswith-functions-in-go

반응형