MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / AR_LTRIM

Function AR_LTRIM

src/arithmetic/string_funcs/string_funcs.c:59–69  ·  view source on GitHub ↗

returns the original string with leading whitespace removed.

Source from the content-addressed store, hash-verified

57
58// returns the original string with leading whitespace removed.
59SIValue AR_LTRIM(SIValue *argv, int argc, void *private_data) {
60 if(SIValue_IsNull(argv[0])) return SI_NullVal();
61
62 char *trimmed = argv[0].stringval;
63
64 while(*trimmed == ' ') {
65 trimmed ++;
66 }
67
68 return SI_DuplicateStringVal(trimmed);
69}
70
71// returns a string containing the specified number of rightmost characters of the original string.
72SIValue AR_RIGHT(SIValue *argv, int argc, void *private_data) {

Callers 1

AR_TRIMFunction · 0.85

Calls 3

SIValue_IsNullFunction · 0.85
SI_NullValFunction · 0.85
SI_DuplicateStringValFunction · 0.85

Tested by

no test coverage detected