Difference between revisions of "CHAR ALLTRIM()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) m (Text replace - "lianjaapi.h" to "lianja_api.h") |
||
Line 7: | Line 7: | ||
==SYNOPSIS== | ==SYNOPSIS== | ||
<code lang="c"> | <code lang="c"> | ||
− | #include " | + | #include "lianja_api.h" |
char CHAR_ALLTRIM(string) | char CHAR_ALLTRIM(string) | ||
Line 26: | Line 26: | ||
<code lang="c"> | <code lang="c"> | ||
#include <stdio.h> | #include <stdio.h> | ||
− | #include " | + | #include "lianja_api.h" |
lianjaapi_char_alltrim() | lianjaapi_char_alltrim() |
Latest revision as of 06:44, 11 April 2013
PURPOSE
Remove leading and trailing blanks from a string
SYNONYM
api_char_alltrim()
SYNOPSIS
#include "lianja_api.h" char CHAR_ALLTRIM(string) <input parameters> char *string; /* Address of a buffer containing character string */ <output parameters> none
DESCRIPTION
The CHAR_ALLTRIM() function removes all leading and trailing blanks from the specified character string.
EXAMPLE
The following example trims the leading and trailing blanks from the first parameter passed.
#include <stdio.h> #include "lianja_api.h" lianjaapi_char_alltrim() { char string[1025] if (_parinfo(1) == API_CTYPE) { strcpy(string, CHAR_ALLTRIM(_parc(1) ) ); } else { strcpy(string,""); } _retc( string ); }
SEE ALSO
_parc(), _parclen(), _parcsiz(), _parinfo(), _retc(), _retclen(), ISCHAR(), CHAR_LOWER(), CHAR_LPAD(), CHAR_LTRIM(), CHAR_RPAD(), CHAR_RTRIM(), CHAR_STR(), CHAR_UPPER(), DATE_STOD()