code: public static ArrayList<Integer> findDistinctIndexesOf( String string, String substringToLookFor )
    {
      ArrayList<Integer> positions = new ArrayList<Integer>();
  
      if( GosuStringUtil.isEmpty( substringToLookFor ) )
      {
        return positions;
      }
  
      int i = 0;
      i = GosuStringUtil.indexOf( string, substringToLookFor, i );
      while( i != -1 )
      {
        positions.add( i );
        i += substringToLookFor.length();
        i = GosuStringUtil.indexOf( string, substringToLookFor, i );
      }
      return positions;
    }
docs: /*
  Finds the index for all disjoint (non-overlapping) occurances of the substringToLookFor in the string.