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

Method parseRespString

src/RedisView/RedisLib/RedisRespParser.cpp:125–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125bool RedisRespParser::parseRespString(const QByteArray &data, QByteArray &sResult) {
126 if(data.isEmpty())
127 return false;
128
129 if (data.at(0) == '+') {
130 sResult = data.mid(1);
131 sResult.chop(2); // 删除尾部\r\n
132 } else
133 return false;
134
135 return true;
136}
137
138bool RedisRespParser::parseRespBulkString(const QByteArray &data, QString &sResult, int &iResult) {
139 if(data.isEmpty())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected