src/chxj_tag_util.c
/**
 * A consecutive head and the last WHITESPACE are removed.
 *
 * @param p    [i]   To use POOL
 * @param s    [i]   The character string that should be removed is specified.
 * @return The character string that has been removed is returned.
 */
A consecutive head and the last WHITESPACE are removed.
@param p    [i]   To use POOL
@param s    [i]   The character string that should be removed is specified.
@return The character string that has been removed is returned.
A consecutive head and the last WHITESPACE are removed . @param p [ i ] To use POOL @param s [ i ] The character string that should be removed is specified . @return The character string that has been removed is returned .
char *
qs_trim_string(apr_pool_t *p, char *s)
{
  char *ss = apr_pstrdup(p, s);
  int len = strlen(s);
  int ii;
  ii = 0;
  for (ii = 0;is_white_space(*ss) && ii < len; ss++, ii++);
  ii = strlen(ss);
  for(;is_white_space(ss[ii-1]) && ii > 0; ii--);
  ss[ii] = '\0';
  return ss;
}
char * qs_trim_string ( apr_pool_t * p , char * s ) { char * ss = apr_pstrdup ( p , s ) ; int len = strlen ( s ) ; int ii ; ii = 0 ; for ( ii = 0 ; is_white_space ( * ss ) && ii < len ; ss ++ , ii ++ ) ; ii = strlen ( ss ) ; for ( ; is_white_space ( ss [ ii - 1 ] ) && ii > 0 ; ii -- ) ; ss [ ii ] = ' \0 ' ; return ss ; }
A consecutive head and the last WHITESPACE are removed.
A consecutive head and the last WHITESPACE are removed .