1: /*----LENSTR----Calculate length of a string as the number
   2:   of characters before a null byte or the total length of the
   3:   string less any blanks on the right end.
   4:   PLWard, USGS, Menlo Park 2/19/80
   5: */
   6: 
   7: int lenstr_(string,length) char string[]; long length;
   8: {
   9:      int i;
  10:      for(i=0; i<length && string[i] != '\0'; i++);
  11:      if (i == length) for( ; i > 0 && string[i-1] == ' ';i--);
  12:      return(i);
  13: }

Defined functions

lenstr_ defined in line 7; never used
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 260
Valid CSS Valid XHTML 1.0 Strict