librnr/examples/example_uri.c
static char *strip(char *s)
{
  size_t  n;
  char   *t;

  while( *s && isspace((int)*s))
  {
    s++;
  }

  if( *s == '\0' )
  {
    return s;
  }

  n = strlen(s);

  t = s + n - 1;
  
  while( (t > s) && isspace((int)*t))
  {
    t--;
  }

  t++;

  *t = '\0';

  return s;
}
/*!
 * \brief Strip leading and trailing white space.
 *
 * An 0 is insterted to strip the trailing white space.
 *
 * \param [out] s   String to strip.
 *
 * \return Returns pointer to start of non-white space token.
 */
\brief Strip leading and trailing white space.
An 0 is insterted to strip the trailing white space.

\param [out] s   String to strip.

\return Returns pointer to start of non-white space token.
\ brief Strip leading and trailing white space . An 0 is insterted to strip the trailing white space . \ param [ out ] s String to strip . \ return Returns pointer to start of non - white space token .
static char *strip(char *s)
{
  size_t  n;
  char   *t;
  while( *s && isspace((int)*s))
  {
    s++;
  }
  if( *s == '\0' )
  {
    return s;
  }
  n = strlen(s);
  t = s + n - 1;
  while( (t > s) && isspace((int)*t))
  {
    t--;
  }
  t++;
  *t = '\0';
  return s;
}
static char * strip ( char * s ) { size_t n ; char * t ; while ( * s && isspace ( ( int ) * s ) ) { s ++ ; } if ( * s == ' \0 ' ) { return s ; } n = strlen ( s ) ; t = s + n - 1 ; while ( ( t > s ) && isspace ( ( int ) * t ) ) { t -- ; } t ++ ; * t = ' \0 ' ; return s ; }
\brief Strip leading and trailing white space.
\ brief Strip leading and trailing white space .