IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 2, 2006, 1:30:35 PM (20 years ago)
Author:
eugene
Message:

updated to use new image/subimage/region coordinate consistency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psLine.c

    r5980 r6311  
    4747}
    4848
     49#ifndef whitespace
     50#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
     51#endif
     52
     53/* Strip whitespace from the start and end of STRING. */
     54int psStringStrip (char *string) {
     55
     56  int i;
     57
     58  if (string == (char *) NULL) return (FALSE);
     59
     60  for (i = 0; whitespace (string[i]); i++);
     61  if (i) memmove (string, string + i, strlen(string+i)+1);
     62  for (i = strlen (string) - 1; (i > 0) && whitespace (string[i]); i--);
     63  string[++i] = 0;
     64  return (i);
     65
     66}
Note: See TracChangeset for help on using the changeset viewer.