1MS_STRNCPCLEAN(3)          Library Functions Manual          MS_STRNCPCLEAN(3)
2
3
4

NAME

6       ms_strncpclean - Non-standard string copying
7
8

SYNOPSIS

10       #include <libmseed.h>
11
12       int  ms_strncpclean ( char *dest, const char *source, int length );
13
14       int  ms_strncpopen ( char *dest, const char *source, int length );
15
16

DESCRIPTION

18       ms_strncpclean copies up to length characters from source to dest while
19       removing all spaces.  The result is left justified and always NULL ter‐
20       minated.   The  destination  string  must have enough room for the non-
21       space characters within length and the NULL terminator,  a  maximum  of
22       length + 1.
23
24       ms_strncpopen  copies length characters from source to dest padding the
25       right side with spaces if  needed  and  leaves  the  string  open-ended
26       (unterminated).   The  result will always be length characters and will
27       never be NULL terminated.
28
29       These routines are useful for converting to and from known length  SEED
30       string fields.
31
32

RETURN VALUES

34       ms_strncpclean returns the number of characters (not including the ter‐
35       minating NULL) in the destination string.
36
37       ms_strncpopen returns the number of characters copied from  the  source
38       string.
39
40

AUTHOR

42       Chad Trabant
43       IRIS Data Management Center
44
45
46
47Libmseed API                      2004/11/22                 MS_STRNCPCLEAN(3)
Impressum