Blame

62c66e Bob Green 2026-08-24 17:16:48
1
% strmid(3) Version 1.0 | Library Functions Manual
433294 Bob Green 2026-08-24 17:18:23
2
***
bd3712 Bob Green 2026-08-24 16:56:18
3
fddeae Bob Green 2026-08-24 16:58:53
4
## NAME
bd3712 Bob Green 2026-08-24 16:56:18
5
62c66e Bob Green 2026-08-24 17:16:48
6
**strmid** — return part of a string.
bd3712 Bob Green 2026-08-24 16:56:18
7
62c66e Bob Green 2026-08-24 17:16:48
8
### LIBRARY
bd3712 Bob Green 2026-08-24 16:56:18
9
62c66e Bob Green 2026-08-24 17:16:48
10
libmega C library (-lmega)
bd3712 Bob Green 2026-08-24 16:56:18
11
62c66e Bob Green 2026-08-24 17:16:48
12
### SYNOPSIS
bd3712 Bob Green 2026-08-24 16:56:18
13
62c66e Bob Green 2026-08-24 17:16:48
14
```
15
#include <nonstd.h>
bd3712 Bob Green 2026-08-24 16:56:18
16
62c66e Bob Green 2026-08-24 17:16:48
17
char *strmid(char *dest, size_t max_len, const char *s, int from, int to);
18
```
bd3712 Bob Green 2026-08-24 16:56:18
19
62c66e Bob Green 2026-08-24 17:16:48
20
### DESCRIPTION
bd3712 Bob Green 2026-08-24 16:56:18
21
c07538 Bob Green 2026-08-24 17:25:23
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.
bd3712 Bob Green 2026-08-24 16:56:18
23
62c66e Bob Green 2026-08-24 17:16:48
24
### RETURN VALUE
bd3712 Bob Green 2026-08-24 16:56:18
25
62c66e Bob Green 2026-08-24 17:16:48
26
On success, a pointer to the string **dest** is returned, otherwise **NULL**.
bd3712 Bob Green 2026-08-24 16:56:18
27
fb39e5 Bob Green 2026-08-24 17:35:10
28
### ERRORS
29
**strmid()** can fail with the following errors:
30
31
* ERANGE - the **_dest_** string does not have enough space.
bd3712 Bob Green 2026-08-24 16:56:18
32
62c66e Bob Green 2026-08-24 17:16:48
33
### NOTES
bd3712 Bob Green 2026-08-24 16:56:18
34
62c66e Bob Green 2026-08-24 17:16:48
35
None.
bd3712 Bob Green 2026-08-24 16:56:18
36
597121 Bob Green 2026-08-24 17:00:00
37
### BUGS
bd3712 Bob Green 2026-08-24 16:56:18
38
62c66e Bob Green 2026-08-24 17:16:48
39
See GitHub Issues: <https://github.com/znac049/mega-micros-sbc3/issues>
bd3712 Bob Green 2026-08-24 16:56:18
40
41
### AUTHOR
42
43
Bob Green <bob@chippers.org.uk>
44
597121 Bob Green 2026-08-24 17:00:00
45
### SEE ALSO