code: private final String getChunk(String s, int slength, int marker)
      {
          StringBuilder chunk = new StringBuilder();
          char c = s.charAt(marker);
          chunk.append(c);
          marker++;
          if (isDigit(c))
          {
              while (marker < slength)
              {
                  c = s.charAt(marker);
                  if (!isDigit(c))
                      break;
                  chunk.append(c);
                  marker++;
              }
          } else
          {
              while (marker < slength)
              {
                  c = s.charAt(marker);
                  if (isDigit(c))
                      break;
                  chunk.append(c);
                  marker++;
              }
          }
          return chunk.toString();
      }
docs: Length of string is passed in for improved efficiency (only need to calculate it once) *