aboutsummaryrefslogtreecommitdiff
path: root/pkg/xtools/xtstripwhite.x
blob: b6cf09c39663575190dabde7aa1fa96d1aa4d4f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<ctype.h>

# XT_STRIPWHITE -- Strip leading white space from a string.
# The string must have an EOS.

procedure xt_stripwhite (str)

char	str[ARB]		# String to be stripped

int	i

begin
	for (i=1; (str[i]!=EOS) && (IS_WHITE(str[i])); i=i+1)
	    ;
	call strcpy (str[i], str, ARB)
end