xref: /csrg-svn/usr.bin/m4/TEST/string.m4 (revision 62077)
138817Sbostic#
2*62077Sbostic# Copyright (c) 1989, 1993
3*62077Sbostic#	The Regents of the University of California.  All rights reserved.
438817Sbostic#
538817Sbostic# This code is derived from software contributed to Berkeley by
638817Sbostic# Ozan Yigit.
738817Sbostic#
847964Sbostic# %sccs.include.redist.sh%
938817Sbostic#
10*62077Sbostic#	@(#)string.m4	8.1 (Berkeley) 06/06/93
1138817Sbostic#
1238817Sbostic
1338817Sbosticdefine(string,`integer $1(len(substr($2,1)))
1438817Sbosticstr($1,substr($2,1),0)
1538817Sbosticdata $1(len(substr($2,1)))/EOS/
1638817Sbostic')
1738817Sbostic
1838817Sbosticdefine(str,`ifelse($2,",,data $1(incr($3))/`LET'substr($2,0,1)/
1938817Sbostic`str($1,substr($2,1),incr($3))')')
20