MCPcopy Index your code
hub / github.com/git-bug/git-bug / removeQuote

Function removeQuote

query/lexer.go:100–111  ·  view source on GitHub ↗
(field string)

Source from the content-addressed store, hash-verified

98}
99
100func removeQuote(field string) string {
101 runes := []rune(field)
102 if len(runes) >= 2 {
103 r1 := runes[0]
104 r2 := runes[len(runes)-1]
105
106 if r1 == r2 && isQuote(r1) {
107 return string(runes[1 : len(runes)-1])
108 }
109 }
110 return field
111}
112
113// split the input into chunks by splitting according to separatorFunc but respecting
114// quotes

Callers 1

tokenizeFunction · 0.85

Calls 1

isQuoteFunction · 0.85

Tested by

no test coverage detected