Try output := col inject: &#39;&#39; into: [:a :b | a,b].<br><br>And check out the terse guide to Squeak:<br><br><a href="http://wiki.squeak.org/squeak/5699">http://wiki.squeak.org/squeak/5699</a>.<br><br>I can never remember the format for inject, but got it right somehow this time!<br>
<br>Rob<br><br><div class="gmail_quote">On Fri, May 22, 2009 at 3:51 PM, Paul DeBruicker <span dir="ltr">&lt;<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
I&#39;ve created an ordered collection of strings.  I&#39;d like to paste each<br>
element of the ordered collection together into one long string that<br>
contains all of the elements of the ordered collection.<br>
<br>
So given this:<br>
| col |<br>
col := OrderedCollection with: &#39;asdf&#39; with: &#39;1234&#39; with: &#39;aaaa&#39;.<br>
<br>
<br>
I&#39;d like to end up with this:<br>
<br>
&#39;asdf1234aaaa&#39;<br>
<br>
I&#39;ve come up with this:<br>
| col |<br>
col := OrderedCollection with: &#39;asdf&#39; with: &#39;1234&#39; with: &#39;aaaa&#39;.<br>
String streamContents: [:stream | col do: [:i | stream print: i]]<br>
<br>
but that gives:<br>
&#39;&#39;&#39;asdf&#39;&#39;&#39;&#39;1234&#39;&#39;&#39;&#39;aaaa&#39;&#39;&#39;<br>
<br>
What else should I do?  Thanks<br>
<br>
Paul<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br>