MCPcopy Create free account
hub / github.com/bytebase/bytebase / skipLineComment

Function skipLineComment

backend/plugin/parser/tidb/backup.go:856–863  ·  view source on GitHub ↗

skipLineComment returns the index of the newline ending the -- or # comment opened at i, or len(s)-1 if it runs to the end.

(s string, i int)

Source from the content-addressed store, hash-verified

854// skipLineComment returns the index of the newline ending the -- or # comment
855// opened at i, or len(s)-1 if it runs to the end.
856func skipLineComment(s string, i int) int {
857 for j := i; j < len(s); j++ {
858 if s[j] == '\n' {
859 return j
860 }
861 }
862 return len(s) - 1
863}
864
865func isASCIISpace(c byte) bool {
866 return c == ' ' || c == '\t' || c == '\n' || c == '\r'

Callers 1

parenDeficitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected