MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / readLineAndRemoveSpaceChar

Function readLineAndRemoveSpaceChar

executor/checker.go:21–29  ·  view source on GitHub ↗

通常情况下,我们定义Tab、换行和空格字符是"空白字符" Usually, tab, line break and white space are the special blank words, called 'SpaceChar' 使用IOReader读写每一行, 并移除空白字符

(buf *bufio.Reader)

Source from the content-addressed store, hash-verified

19
20// 使用IOReader读写每一行, 并移除空白字符
21func readLineAndRemoveSpaceChar(buf *bufio.Reader) (string, error) {
22 line, isContinue, err := buf.ReadLine()
23 for isContinue && err == nil {
24 var next []byte
25 next, isContinue, err = buf.ReadLine()
26 line = append(line, next...)
27 }
28 return removeSpaceChar(string(line)), err
29}
30
31// 移除空白字符
32// Remove the special blank words in a string

Callers 1

lineDiffFunction · 0.85

Calls 1

removeSpaceCharFunction · 0.85

Tested by

no test coverage detected