title: Edit string array and convert it to 2D char array
body: <p>I start with an array of strings formatted <code>useful.useless</code>. I need to trim out the <code>.useless</code> part, and then put the <code>useful</code> part in a 2D <code>char</code> array.</p>
  <p>I see a way that involves creating a second string array containing only the <code>useful</code> part, and then converting that to a 2D char array, but there is probably a more effective way.</p>
  <p>However, I don't know how to convert string array to 2D char array</p>
  <pre class="lang-java prettyprint-override"><code>public static void main (String[]args){
      
      // this here is just to create an array so the example runs
      String in = &quot;useful1.useless1,useful2.useless2,useful3.useless3,&quot;;
      String[] strArray = null; 
      strArray = in.split(&quot;,&quot;);
      
      /*the array of strings is thus
      [useful1.useless1, useful2.useless2, useful3.useless3]
      */
      
      char [][] charArray = new char [strArray.length][];
      
      /* trim from the . so only useful part remains
      then put in 2d char array, which should look like
      
      [u,s,e,f,u,l,1]
      [u,s,e,f,u,l,2]
      [u,s,e,f,u,l,3]
      
      the array will be a ragged array
      */
  
  }
  </code></pre>