source: buchla-68k/libsm/strltrm.c@ 0c834c5

Last change on this file since 0c834c5 was 0580615, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Point of no return.

  • Property mode set to 100644
File size: 536 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 *strltrm(char *s)
13{
14 register char c;
15 register char *lp, *rp;
16
17 if (*s NE ' ')
18 return(s);
19
20 lp = s;
21 rp = s;
22
23 while (*rp EQ ' ')
24 ++rp;
25
26 while (c = *rp++)
27 *lp++ = c;
28
29 *lp = '\0';
30
31 return(s);
32}
Note: See TracBrowser for help on using the repository browser.