1 Reply Latest reply: Feb 29, 2008 2:08 PM by 807601 RSS

    Split an array of Strings

    807601
      Hi, can you please tell me how to split an array of strings.

      Example:
      String[] s ={ "0", "1 0", "2 1 0"};

      String[] a;
      int [] b;

      String[] a should have just the first values, i.e String [] a ={"0", "1", "2"}
      then int[] b should have the count of each value in s
      int[] b={" 1", "2", "3"};

      The input will be seperated by spaces, so will a split on " " work?
      Please please help me.........