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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
<html>
<head>
<title>EAGLE Help: strjoin()</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>strjoin()</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Joins a string array to form a single string.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>string strjoin(string array[], char separator);</tt>
<p>
<dt>
<b>Returns</b>
<dd>
The <tt>strjoin</tt> function returns the combined entries of <tt>array</tt>.
<p>
<dt>
<b>Description</b>
<dd>
<tt>strjoin</tt> joins all entries in <tt>array</tt>, delimited by the given
<tt>separator</tt> and returns the resulting string.
<p>
If <tt>separator</tt> is the newline character (<tt>"\n"</tt>) the resulting
string will be terminated with a newline character.
This is done to have a text file that
consists of N lines (each of which is terminated with a newline) and is read
in with the <a href=240.htm>fileread()</a> function and
<a href=264.htm>split</a> into
an array of N strings to be joined to the original string as read from the file.
<p>
</dl>
<b>See also</b> <a href=264.htm>strsplit</a>,
<a href=249.htm>lookup</a>,
<a href=240.htm>fileread</a>
<p>
<b>Example</b>
<pre>
string a[] = { "Field 1", "Field 2", "Field 3" };
string s = strjoin(a, ':');
</pre>
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|