% strmid(3) Version 1.0 | Library Functions Manual
-
***
+
I've included a run-time library which I've implemented from the ground up. Why? Because it helped me to re-immerse myself into the world of C programming, as, for most of the last ~25 years, I've been focussed on Linux and network system admin, and not coding.
-
## NAME
+
The library contains a pretty comprehensive set of "standard" library function that you would expect to find on most Linux systems. In addition, I've added many functions that I find useful or that help work with the hardware on the SBC-3
-
**strmid** — return part of a string.
+
I've written man pages for many of the library functions and the goal is to have a manpage for every public function in the **libmega.a** library. All good things come to those who wait!
-
### LIBRARY
+
## Exceptions
+
There are a few exceptions, where, for the sake of expediency, I've grabbed an implementation of a given function from a 3rd party. In those small number of cases, I've made it cl;ear in the code itself that it is not my own work, or is a derivative.
-
libmega C library (-lmega)
-
-
### SYNOPSIS
-
-
```
-
#include <nonstd.h>
-
-
char *strmid(char *dest, size_t max_len, const char *s, int from, int to);
-
```
-
-
### DESCRIPTION
-
-
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.
-
-
### RETURN VALUE
-
-
On success, a pointer to the string **dest** is returned, otherwise **NULL**.
-
-
### ERRORS
-
**strmid()** can fail with the following errors:
-
-
* ERANGE - the **_dest_** string does not have enough space.
-
-
### NOTES
-
-
None.
-
-
### BUGS
-
-
See GitHub Issues: <https://github.com/znac049/mega-micros-sbc3/issues>