* Partially corrected: [yang type range statement does not support multiple values](https://github.com/clicon/clixon/issues/59).
* Should work for netconf and restconf, but not for CLI. * Fixed again: [Range parsing is not RFC 7950 compliant](https://github.com/clicon/clixon/issues/71)
This commit is contained in:
parent
f718c716b6
commit
19343c2b21
6 changed files with 329 additions and 202 deletions
|
|
@ -624,13 +624,14 @@ clixon_trim(char *str)
|
|||
char *s = str;
|
||||
int i;
|
||||
|
||||
while (strlen(s) && isblank(s[0]))
|
||||
while (strlen(s) && isblank(s[0])) /* trim from front */
|
||||
s++;
|
||||
for (i=0; i<strlen(s); i++)
|
||||
if (isblank(s[i])){
|
||||
for (i=strlen(s)-1; i>=0; i--){ /* trim from rear */
|
||||
if (isblank(s[i]))
|
||||
s[i] = '\0';
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue