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

Function AR_TRIM

src/arithmetic/string_funcs/string_funcs.c:508–514  ·  view source on GitHub ↗

returns the original string with leading and trailing whitespace removed.

Source from the content-addressed store, hash-verified

506
507// returns the original string with leading and trailing whitespace removed.
508SIValue AR_TRIM(SIValue *argv, int argc, void *private_data) {
509 if(SIValue_IsNull(argv[0])) return SI_NullVal();
510 SIValue ltrim = AR_LTRIM(argv, argc, NULL);
511 SIValue trimmed = AR_RTRIM(&ltrim, 1, NULL);
512 SIValue_Free(ltrim);
513 return trimmed;
514}
515
516// returns true if argv[1] is a substring of argv[0].
517SIValue AR_CONTAINS(SIValue *argv, int argc, void *private_data) {

Callers

nothing calls this directly

Calls 5

SIValue_IsNullFunction · 0.85
SI_NullValFunction · 0.85
AR_LTRIMFunction · 0.85
AR_RTRIMFunction · 0.85
SIValue_FreeFunction · 0.85

Tested by

no test coverage detected