title: Convert from String[] to String and again to String[]
body: <p>In my JADE program, one agent needs to send an ACL message to another agent. For the agent sending the message (agent1) it stores a String[] array of values that it has to send. </p>
  
  <p>However, in order to actually send the ACL message the content must only be a String and nothing else. The method used add content to the message is the following : 
  <code>msg.setContent(String str)</code></p>
  
  <p>So the problem is I have a range of values stored in agent1 , which are all in an array. I have to send these values in ONE message so I can't send several messages with each element of the array. In my current "Test" array I only put two elements so this is what I'm doing so far:</p>
  
  <pre><code>msg.setContent(theArray[0] + theArray[1]);
  </code></pre>
  
  <p>Now when the receiving agent (agent2) opens this message and gets the content it's obviously just a concatenation of the two elements of the array I sent from agent1.</p>
  
  <p>How do I get agent2 to split this one String back into an array of String[] ? I have looked at the method</p>
  
  <pre><code>split(String regex)
  </code></pre>
  
  <p>for the String value of the message content. So I'm thinking since each element of the array in Agent1 starts with a Capital letter, then maybe I could enter a regular expression to split String as soon as a capital letter is encountered. </p>
  
  <p>However I'm not sure how to do this, or if it's even a good idea. Please provide any suggestions.</p>
  
  <p>Relevant API doc:</p>
  
  <p><a href="http://jade.cselt.it/doc/api/jade/lang/acl/ACLMessage.html#setContent(java.lang.String" rel="nofollow">http://jade.cselt.it/doc/api/jade/lang/acl/ACLMessage.html#setContent(java.lang.String</a>)</p>