The Open Source Swiss Army Knife

/code/cPP/basics_cPP/
/code/cPP/basics_cPP/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /code   /cPP   /basics_cPP 
Permalink: XSTRCAt.c
Title: add
article options : please login   |  raw source view  

<!-- X-URL: http://www.snippets.org/snippets/portable/XSTRCAT+C.php3 -->
<!-- Date: Tue, 11 Jun 2002 13:28:57 GMT -->
<BASE HREF="http://www.snippets.org/snippets/portable/XSTRCAT+C.php3">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="GENERATOR" CONTENT="Mozilla/4.08 [en] (Win95; I) [Netscape]">
   <META http-equiv="pragma" contents="no-cache">
   <TITLE>XSTRCAT.C</TITLE>
   <LINK TARGET="main">
   <STYLE="text/css">
   </STYLE>
</head>

<BODY BACKGROUND="../graphics/code.jpg">

<center>
Tuesday, 11-Jun-2002, 13:28:57 GMT<BR>
Last modified: 11-May-2002, 23:45:57 GMT<BR>
<HR WIDTH=80% ALIGN=center>
A minimum screen size of 600 x 800 is recommended for viewing SNIPPETS listings<br>

<br><B><FONT SIZE=+2>XSTRCAT.C</FONT></B><p>

<a href="ftp:../code/XSTRCAT.C"><img border=0 src="../graphics/download.jpg" alt="XSTRCAT.C"></a><p>

<table width=90% bgcolor=FFFFC0 border=3 bordercolor="red" cellpadding=2 cellspacing=2><tr><td><font color=000080><b><pre>/* +++Date last modified: 05-Jul-1997 */

/*
**  XSTRCAT.C - String concatenation function
**
**  Notes: 1st argument must be a buffer large enough to contain the
**         concatenated strings.
**
**         2nd thru nth arguments are the string to concatenate.
**
**         (n+1)th argument must be NULL to terminate the list.
*/

#include &lt;stdarg.h&gt;
#include "snip_str.h"

#if defined(__cplusplus) &amp;&amp; __cplusplus
 extern "C" {
#endif

char *xstrcat(char *des, char *src, ...)
{
        char *destination = des;
        va_list v;

        va_start(v, src);

        while (src != 0)
        {
                while (*src != 0)
                        *des++ = *src++;
                src = va_arg(v, char *);
        }
        *des = 0;

        va_end(v);

        return destination;
}

#if defined(__cplusplus) &amp;&amp; __cplusplus
 }
#endif
</pre></b></font></td></tr></table>
</center><br>
<a href="ftp:../code/XSTRCAT.C"><img border=0 src="../graphics/download.jpg" alt="XSTRCAT.C"></a>

<pre>


</pre>

&copy;2001-2002 by Bob Stout, all rights reserved<p>
<a href="http://www.evrsoft.com/1stpage/"><img src="http://www.evrsoft.com/1stpage/1st-now.gif" border="0" alt="Made with 1st Page 2000 - Professional tools for real minds."></a>

</body>
</html>

Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top