An utility to extract substring from a string, inspired by the GNU
expr
extension of the same name. This implementation is under
the ISC licence.
- C compiler ;
- libbsd on Linux.
On OpenBSD:
$ make
$ DESTDIR=~/ make install # or doas make install
On Linux:
$ LDADD=-lbsd CFLAGS="-D NEED_LIBBSD" make
$ DESTDIR=~/ make install # or sudo make install
To see a description of the options see the man page.
$ substr hello 1 2
he
$ substr "Omelette du fromage" 13 7
fromage
$ substr toto 2
oto
All the code is licensed under the ISC License.