MCPcopy Create free account
hub / github.com/MapServer/MapServer / msSLDGetRightExpressionOfOperator

Function msSLDGetRightExpressionOfOperator

mapogcsld.c:4580–4614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4578}
4579
4580char *msSLDGetRightExpressionOfOperator(char *pszExpression)
4581{
4582 char *pszAnd = NULL, *pszOr = NULL, *pszNot=NULL;
4583
4584 pszAnd = strstr(pszExpression, " AND ");
4585 if (!pszAnd)
4586 pszAnd = strstr(pszExpression, " and ");
4587
4588 if (pszAnd)
4589 return msStrdup(pszAnd+4);
4590 else
4591 {
4592 pszOr = strstr(pszExpression, " OR ");
4593 if (!pszOr)
4594 pszOr = strstr(pszExpression, " or ");
4595
4596 if (pszOr)
4597 return msStrdup(pszOr+3);
4598 else
4599 {
4600 pszNot = strstr(pszExpression, "NOT ");
4601 if (!pszNot)
4602 pszNot = strstr(pszExpression, "not ");
4603 if (!pszNot)
4604 pszNot = strstr(pszExpression, "NOT(");
4605 if (!pszNot)
4606 pszNot = strstr(pszExpression, "not(");
4607
4608 if (pszNot)
4609 return msStrdup(pszNot+4);
4610 }
4611 }
4612 return NULL;
4613
4614}
4615
4616char *msSLDGetLeftExpressionOfOperator(char *pszExpression)
4617{

Callers 1

BuildExpressionTreeFunction · 0.85

Calls 1

msStrdupFunction · 0.85

Tested by

no test coverage detected