forked from EarthScope/libmseed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathms_strncpclean.3
40 lines (31 loc) · 1.28 KB
/
ms_strncpclean.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.TH MS_STRNCPCLEAN 3 2004/11/22 "Libmseed API"
.SH NAME
ms_strncpclean - Non-standard string copying
.SH SYNOPSIS
.nf
.B #include <libmseed.h>
.BI "int \fBms_strncpclean\fP ( char *" dest ", const char *" source ", int " length " );"
.BI "int \fBms_strncpopen\fP ( char *" dest ", const char *" source ", int " length " );"
.fi
.SH DESCRIPTION
\fBms_strncpclean\fP copies up to \fIlength\fP characters from
\fIsource\fP to \fIdest\fP while removing all spaces. The result is
left justified and always NULL terminated. The destination string
must have enough room for the non-space characters within \fIlength\fP
and the NULL terminator, a maximum of \fPlength\fP + 1.
\fBms_strncpopen\fP copies \fIlength\fP characters from \fIsource\fP
to \fIdest\fP padding the right side with spaces if needed and leaves
the string open-ended (unterminated). The result will always be
\fIlength\fP characters and will never be NULL terminated.
These routines are useful for converting to and from known length SEED
string fields.
.SH RETURN VALUES
\fBms_strncpclean\fP returns the number of characters (not including
the terminating NULL) in the destination string.
\fBms_strncpopen\fP returns the number of characters copied from the
source string.
.SH AUTHOR
.nf
Chad Trabant
IRIS Data Management Center
.fi