MCPcopy Index your code
hub / github.com/bytebase/bytebase / catchCaret

Function catchCaret

backend/plugin/parser/plsql/completion_test.go:1450–1465  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

1448}
1449
1450func catchCaret(s string) (string, int, int) {
1451 line := 1
1452 column := 0
1453 for i, c := range s {
1454 switch c {
1455 case '|':
1456 return s[:i] + s[i+1:], line, column
1457 case '\n':
1458 line++
1459 column = 0
1460 default:
1461 column++
1462 }
1463 }
1464 return s, -1, -1
1465}
1466
1467func catchCaretUTF16(s string) (string, int, int) {
1468 line := 1

Callers 3

TestCompletionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected