| 123 | } |
| 124 | |
| 125 | bool 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 | |
| 138 | bool RedisRespParser::parseRespBulkString(const QByteArray &data, QString &sResult, int &iResult) { |
| 139 | if(data.isEmpty()) |
nothing calls this directly
no outgoing calls
no test coverage detected