Blame
|
1 | % strmid(3) Version 1.0 | Library Functions Manual |
||||||
|
2 | *** |
||||||
|
3 | |||||||
|
4 | ## NAME |
||||||
|
5 | |||||||
|
6 | **strmid** — return part of a string. |
||||||
|
7 | |||||||
|
8 | ### LIBRARY |
||||||
|
9 | |||||||
|
10 | libmega C library (-lmega) |
||||||
|
11 | |||||||
|
12 | ### SYNOPSIS |
||||||
|
13 | |||||||
|
14 | ``` |
||||||
| 15 | #include <nonstd.h> |
|||||||
|
16 | |||||||
|
17 | char *strmid(char *dest, size_t max_len, const char *s, int from, int to); |
||||||
| 18 | ``` |
|||||||
|
19 | |||||||
|
20 | ### DESCRIPTION |
||||||
|
21 | |||||||
|
22 | Returns a portion of a the string **_s_**, specified by the **_from_** and **_to_** parameters. The string porttion is copied into the string **_dest_**, up to a limit of **_max_len_** characters. If there is not enough room, **NULL** is returned. |
||||||
|
23 | |||||||
|
24 | ### RETURN VALUE |
||||||
|
25 | |||||||
|
26 | On success, a pointer to the string **dest** is returned, otherwise **NULL**. |
||||||
|
27 | |||||||
|
28 | ### ERRORS |
||||||
| 29 | **strmid()** can fail with the following errors: |
|||||||
| 30 | ||||||||
| 31 | * ERANGE - the **_dest_** string does not have enough space. |
|||||||
|
32 | |||||||
|
33 | ### NOTES |
||||||
|
34 | |||||||
|
35 | None. |
||||||
|
36 | |||||||
|
37 | ### BUGS |
||||||
|
38 | |||||||
|
39 | See GitHub Issues: <https://github.com/znac049/mega-micros-sbc3/issues> |
||||||
|
40 | |||||||
| 41 | ### AUTHOR |
|||||||
| 42 | ||||||||
| 43 | Bob Green <bob@chippers.org.uk> |
|||||||
| 44 | ||||||||
|
45 | ### SEE ALSO |
||||||