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

Method parseRespInteger

src/RedisView/RedisLib/RedisRespParser.cpp:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95bool RedisRespParser::parseRespInteger(const QByteArray &data, qlonglong &llResult) {
96 if(data.isEmpty())
97 return false;
98
99 QString value;
100 if (data.at(0) == ':') {
101 value = data.mid(1);
102 value.chop(2); // 删除尾部\r\n
103 llResult = value.toLongLong();
104 } else
105 return false;
106
107 return true;
108}
109
110bool RedisRespParser::parseRespDouble(const QByteArray &data, double &dResult) {
111 if(data.isEmpty())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected