https://github.com/tleguern/substr
An utility to extract substring from a string
https://github.com/tleguern/substr
c extract-substring finished substr
Last synced: about 2 months ago
JSON representation
An utility to extract substring from a string
- Host: GitHub
- URL: https://github.com/tleguern/substr
- Owner: tleguern
- License: isc
- Created: 2014-06-13T12:28:54.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-12-26T15:57:52.000Z (over 3 years ago)
- Last Synced: 2025-02-13T09:18:02.365Z (4 months ago)
- Topics: c, extract-substring, finished, substr
- Language: Roff
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# substr
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.## Contents
1. [Install](#install)
2. [Instructions](#instruction)
3. [Examples](#examples)
4. [License](#license)## Install
### Requires
* C compiler ;
* libbsd on Linux.### Build
On OpenBSD:
$ make
$ DESTDIR=~/ make install # or doas make installOn Linux:
$ LDADD=-lbsd CFLAGS="-D NEED_LIBBSD" make
$ DESTDIR=~/ make install # or sudo make install## Instructions
To see a description of the options see the [man](./substr.md) page.
## Example
$ substr hello 1 2
he
$ substr "Omelette du fromage" 13 7
fromage
$ substr toto 2
oto## License
All the code is licensed under the ISC License.