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

Function skipBlockComment

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

skipBlockComment returns the index of the closing "/" of the /* */ comment opened at i, or len(s)-1 if unterminated.

(s string, i int)

Source from the content-addressed store, hash-verified

843// skipBlockComment returns the index of the closing "/" of the /* */ comment
844// opened at i, or len(s)-1 if unterminated.
845func skipBlockComment(s string, i int) int {
846 for j := i + 2; j+1 < len(s); j++ {
847 if s[j] == '*' && s[j+1] == '/' {
848 return j + 1
849 }
850 }
851 return len(s) - 1
852}
853
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.

Callers 1

parenDeficitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected