|
Description
|
[ahl 12.17.2007]
The DTrace substr() subroutine is meant to mimic the behavior of perl's substr() which it does except if the data is smaller than strsize variable:
# perl -e 'printf("-%s-\n", substr("foobarbaghead", 100, 3));'
--
# dtrace -n BEGIN'{ printf("-%s-", substr("foobarbaghead", 100, 3)); exit(0); }' -q
--
# dtrace -n BEGIN'{ printf("-%s-", substr("foobarbaghead", 100, 3)); exit(0); }' -q -x strsize=10
-ead-
|