docs: function (string, size, begin) {
              var result = [], start, strLen = string.length, i, len;
  
              if (begin === true) {
                  start = 0;
  
                  for (i = 0, len = size.length; i < len; i += 1) {
                      result.push(string.substr(start, size[i]));
                      start += size[i];
  
                      if (start >= strLen) {
                          break;
                      }
                  }
  
                  if (start < strLen) {
                      // string was not consumed completely
                      result.push(string.substring(start));
                  }
  
                  return result;
              } else {
                  start = strLen;
  
                  for (i = 0, len = size.length; i < len; i += 1) {
                      result.push(string.substring(Math.max(0, start - size[i]), start));
                      start -= size[i];
  
                      if (start <= 0) {
                          break;
                      }
                  }
  
                  if (start > 0) {
                      // string was not consumed completely
                      result.push(string.substring(0, start));
                  }
  
                  return result.reverse();
              }
          }