source: buchla-68k/orig/CLIBRARY/STRLTRM.C@ d235320

Last change on this file since d235320 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 583 bytes
Line 
1/*
2 =============================================================================
3 strltrm() -- trim leading blanks from a string, in-place
4 Version 1 -- 1988-08-19 -- D.N. Lynx Crowe
5
6 Returns a pointer to the string.
7 =============================================================================
8*/
9
10#include "stddefs.h"
11
12char *
13strltrm(s)
14register char *s;
15{
16 register char c;
17 register char *lp, *rp;
18
19 if (*s NE ' ')
20 return(s);
21
22 lp = s;
23 rp = s;
24
25 while (*rp EQ ' ')
26 ++rp;
27
28 while (c = *rp++)
29 *lp++ = c;
30
31 *lp = '\0';
32
33 return(s);
34}
Note: See TracBrowser for help on using the repository browser.