MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RM_StringToLongLong

Function RM_StringToLongLong

src/module.cpp:1388–1391  ·  view source on GitHub ↗

Convert the string into a long long integer, storing it at `*ll`. * Returns REDISMODULE_OK on success. If the string can't be parsed * as a valid, strict long long (no spaces before/after), REDISMODULE_ERR * is returned. */

Source from the content-addressed store, hash-verified

1386 * as a valid, strict long long (no spaces before/after), REDISMODULE_ERR
1387 * is returned. */
1388int RM_StringToLongLong(const RedisModuleString *str, long long *ll) {
1389 return string2ll(szFromObj(str),sdslen(szFromObj(str)),ll) ? REDISMODULE_OK :
1390 REDISMODULE_ERR;
1391}
1392
1393/* Convert the string into a double, storing it at `*d`.
1394 * Returns REDISMODULE_OK on success or REDISMODULE_ERR if the string is

Callers

nothing calls this directly

Calls 3

szFromObjFunction · 0.85
sdslenFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected