项目作者: tleguern

项目描述 :
An utility to extract substring from a string
高级语言: Roff
项目地址: git://github.com/tleguern/substr.git
创建时间: 2014-06-13T12:28:54Z
项目社区:https://github.com/tleguern/substr

开源协议:

下载


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
  2. Instructions
  3. Examples
  4. License

Install

Requires

  • C compiler ;
  • libbsd on Linux.

Build

On OpenBSD:

  1. $ make
  2. $ DESTDIR=~/ make install # or doas make install

On Linux:

  1. $ LDADD=-lbsd CFLAGS="-D NEED_LIBBSD" make
  2. $ DESTDIR=~/ make install # or sudo make install

Instructions

To see a description of the options see the man page.

Example

  1. $ substr hello 1 2
  2. he
  3. $ substr "Omelette du fromage" 13 7
  4. fromage
  5. $ substr toto 2
  6. oto

License

All the code is licensed under the ISC License.