Convert the string into a stream ID, storing it at `*id`. * Returns REDISMODULE_OK on success and returns REDISMODULE_ERR if the string * is not a valid string representation of a stream ID. The special IDs "+" and * "-" are allowed. */
| 1385 | * "-" are allowed. |
| 1386 | */ |
| 1387 | int RM_StringToStreamID(const RedisModuleString *str, RedisModuleStreamID *id) { |
| 1388 | streamID streamid; |
| 1389 | if (streamParseID(str, &streamid) == C_OK) { |
| 1390 | id->ms = streamid.ms; |
| 1391 | id->seq = streamid.seq; |
| 1392 | return REDISMODULE_OK; |
| 1393 | } else { |
| 1394 | return REDISMODULE_ERR; |
| 1395 | } |
| 1396 | } |
| 1397 | |
| 1398 | /* Compare two string objects, returning -1, 0 or 1 respectively if |
| 1399 | * a < b, a == b, a > b. Strings are compared byte by byte as two |
nothing calls this directly
no test coverage detected