home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / STRLIB.ZIP / XSTRING.3C < prev   
Encoding:
Text File  |  1986-01-13  |  2.6 KB  |  109 lines

  1.  
  2. .TH XSTRING 3C local
  3. .SH NAME
  4. strxcat, strxncat, strxcpy, strxncpy, strxmov, strxnmov \- string operations with variable number of arguments
  5. .SH SYNOPSIS
  6. .nf
  7. .PP
  8. .B "#include <strings.h>"
  9. .PP
  10. .B "char \(**strxcat(dst, src1, src2, ..., NullS)"
  11. .B "    char \(**dst, \(**src1, \(**src2, ...;"
  12. .PP
  13. .B "char \(**strxncat(dst, len, src1, src2, ..., NullS)"
  14. .B "    char \(**dst, \(**src1, \(**src2, ...;"
  15. .B "    int len;"
  16. .PP
  17. .B "char \(**strxcpy(dst, src1, src2, ..., NullS)"
  18. .B "    char \(**dst, \(**src1, \(**src2, ...;"
  19. .PP
  20. .B "char \(**strxncpy(dst, len, src1, src2, ..., NullS)"
  21. .B "    char \(**dst, \(**src1, \(**src2, ...;"
  22. .B "    int len;"
  23. .PP
  24. .B "char \(**strxmov(dst, src1, src2, ..., NullS)"
  25. .B "    char \(**dst, \(**src1, \(**src2, ...;"
  26. .PP
  27. .B "char \(**strxnmov(dst, len, src1, src2, ..., NullS)"
  28. .B "    char \(**dst, \(**src1, \(**src2, ...;"
  29. .B "    int len;"
  30. .SH DESCRIPTION
  31. These functions operate on null-terminated strings.
  32. They are equivalent to the corresponding functions
  33. .IR strcat (3c),
  34. .IR strncat (3c),
  35. .IR strmov (3c),
  36. .IR strnmov (3c),
  37. .IR strcpy (3c),
  38. and
  39. .IR strncpy (3c),
  40. except that they allow more than one source string to be supplied.
  41. .IR Strxcat ,
  42. .IR strxncat ,
  43. .IR strxcpy ,
  44. and
  45. .I strxncpy
  46. return their first argument (the destination pointer).
  47. .I Strxmov
  48. and
  49. .I strxnmov
  50. return a pointer to just after the last non-NUL character
  51. moved to the destination.  This is the same convention that
  52. is used throughout the strings package.
  53. Except as implied by the length parameter
  54. .IR len ,
  55. they do not check for overflow of any receiving string.
  56. .PP
  57. .I Strxcat
  58. appends a copy of the strings
  59. .IR src1 ,
  60. .IR src2 ,
  61. and so on, to
  62. .IR dst .
  63. The resulting string will always be NUL-terminated.
  64. .I Strxncat
  65. copies at most
  66. .I len
  67. characters.
  68. The resulting string will be NUL-terminated if fewer than
  69. .I len
  70. characters were moved.  At most one NUL is added.
  71. .PP
  72. .I Strxcpy
  73. copies the strings
  74. .IR src1 ,
  75. .IR src2 ,
  76. and so on, into
  77. .IR dst .
  78. .I Strxncpy
  79. copies at most
  80. .I len
  81. characters.
  82. The resulting string will not be null-terminated if
  83. .I len
  84. or more characters were in the source strings.
  85. By analogy with
  86. .IR strncpy ,
  87. .I dst
  88. will be padded on the right with NUL characters to exactly
  89. .I len
  90. bytes.
  91. .PP
  92. Apart from their return value,
  93. .I strxmov
  94. and
  95. .I strxnmov
  96. have the same effect as
  97. .I strxcpy
  98. and
  99. .IR strxncpy .
  100. .SH CAVEATS
  101. The placement for the
  102. .I len
  103. variable is different from the placement in the functions
  104. .IR strncat (3c),
  105. .IR strncpy (3c),
  106. and
  107. .IR strnmov (3c).
  108.  
  109.