1 /*-------------- Telecommunications & Signal Processing Lab ---------------
2                              McGill University
3 
4 Routine:
5   char *STtrimIws (const char Si[])
6 
7 Purpose:
8   Trim leading white-space
9 
10 Description:
11   This routine returns a pointer to the first character in a string that is not
12   white-space (as defined by isspace).  If the input string consists entirely
13   of white-space, this routine returns a pointer to the terminating null
14   character.
15 
16 Parameters:
17   <-  char *STrimIws
18       Pointer to the first non-white-space character
19    -> const char Si[]
20       Input character string
21 
22 Author / revision:
23   P. Kabal  Copyright (C) 2003
24   $Revision: 1.8 $  $Date: 2003/05/09 03:06:42 $
25 
26 -------------------------------------------------------------------------*/
27 
28 #include <ctype.h>
29 
30 #include <libtsp/nucleus.h>
31 
32 
33 char *
STtrimIws(const char Si[])34 STtrimIws (const char Si[])
35 
36 {
37   /* Find the first non-white-space character */
38   for (; isspace ((int) *Si); ++Si)
39     ;
40 
41   return ((char *) Si);
42 }
43