MCPcopy Create free account
hub / github.com/cc20110101/RedisView / parseRespError

Method parseRespError

src/RedisView/RedisLib/RedisRespParser.cpp:180–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180bool RedisRespParser::parseRespError(const QByteArray &data, QByteArray &sResult) {
181 if(data.isEmpty())
182 return false;
183
184 if (data.at(0) == '-') {
185 sResult = data.mid(1);
186 sResult.chop(2); // 删除尾部\r\n
187 } else
188 return false;
189
190 return true;
191}
192
193bool RedisRespParser::parseRespArray(const QByteArray &data, QList<RespType> &vResult, int &iResult) {
194 if(data.isEmpty())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected