finishString casts the given buffer to a string and returns the unused portion of the buffer. The caller must not use buf again.
(buf []byte)
| 136 | // finishString casts the given buffer to a string and returns the unused |
| 137 | // portion of the buffer. The caller must not use buf again. |
| 138 | func (s *Scanner) finishString(buf []byte) string { |
| 139 | str := *(*string)(unsafe.Pointer(&buf)) |
| 140 | s.returnBuffer(buf) |
| 141 | return str |
| 142 | } |
| 143 | |
| 144 | func (s *Scanner) scanSetup(lval ScanSymType, allowComments bool) (int, bool) { |
| 145 | lval.SetID(0) |
no test coverage detected