Github user anoopsharma00 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/590#discussion_r70459281
  
    --- Diff: core/sql/common/str.cpp ---
    @@ -997,19 +997,40 @@ Lng32 str_decode(void *tgt, Lng32 tgtMaxLen, const 
char *src, Lng32 srcLen)
       return length;
     }
     
    -// Strips leading and trailing blanks. src will contain a NULL after the
    +// Strips leading and/or trailing blanks. src will contain a NULL after the
     // end of the first non-blank character.The length of the "stripped" string
    -// is returned in len
    -
    -void str_strip_blanks(char *src , Lng32 &len)
    +// is returned in len.
    +// Returns pointer to the start of string after leading blanks.
    +char * str_strip_blanks(char *src , Lng32 &len, 
    +                        NABoolean stripLeading,
    +                        NABoolean stripTrailing
    +                        )
     {
    +  if (! src)
    +    return NULL;
    +
       len = str_len(src)-1;
    -  while ((len >= 0) && (src[len] == ' '))
    -    len--;
    +  if (len <= 0)
    +    return src;
    --- End diff --
    
    Returned value from this method is a pointer to the string. Length is not 
returned. 
    The check at line 1013 returns the input src if its length is 1.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to