<awangdev>Encode and Decode Strings_2.java
public List<String> decode(String s) {
        List<String> strs = new ArrayList<>();
        if (s == null || s.length() == 0) {
            return strs;
        }
        int start = 0;
        while (start < s.length()) {
            int ind = s.indexOf("#", start);
            int leng = Integer.parseInt(s.substring(start, ind));
                
            int end = ind + 1 + leng;
            strs.add(s.substring(ind + 1, end));
            start = end;
        }
        return strs;
    }
public List < String > var_1 ( String var_2 ) {
  List < String > var_5 = new ArrayList < > ( ) ;
  if ( var_2 == null || var_2 . length ( ) == 0 ) {
    return var_5 ;
  }
  int var_9 = 0 ;
  while ( var_9 < var_2 . length ( ) ) {
    int var_12 = var_2 . indexOf ( "#" , var_9 ) ;
    int var_16 = Integer . parseInt ( var_2 . substring ( var_9 , var_12 ) ) ;
    int var_18 = var_12 + 1 + var_16 ;
    var_5 . add ( var_2 . substring ( var_12 + 1 , var_18 ) ) ;
    var_9 = var_18 ;
  }
  return var_5 ;
}
