summaryrefslogtreecommitdiff
path: root/test/substr.awk
blob: 60163696d2c3a7647d4bbf6aff24e1cb234d125f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
BEGIN {
	x = "A"
	printf("%-39s\n", substr(x,1,39))
	print substr("abcdef", 0, 2)
	print substr("abcdef", 2.3, 2)
	print substr("abcdef", -1, 2)
	print substr("abcdef", 1, 0)
	print substr("abcdef", 1, -3)
	print substr("abcdef", 1, 2.3)
	print substr("", 1, 2)
	print substr("abcdef", 5, 5)
	print substr("abcdef", 7, 2)
	exit (0)
}