rest ::= (normal-rest / invisible-rest / inaudible-rest) [note-length]
194954
Rule Rest() {
		return Sequence(
			FirstOfS(NormalRest(), InvisibleRest(), InaudibleRest()),
			OptionalS(NoteLength())
		).label(Rest);
	}
179661
def note=(note)

      if !note.nil? && note.to_s.length > 60
        fail ArgumentError, "invalid value for 'note', the character length must be smaller than or equal to 60."
      end

      @note = note
    end
621481
def URIUnescapeString(str, len, target):
    
    ret = libxml2mod.xmlURIUnescapeString(str, len, target)
    return ret
1169313
def notes(options = {})
      # Create a default 2 item hash and update if options is supplied
      options = {
        id:   nil,
        type: nil
      }.update(options)
      return nil if @_notes.nil?
      return nil if @_notes.empty?
      # Empty 2-D Hash to be used for notes found based on id and type
      notes_found = Hash.new do |h, k|
        # h is the id portion of the hash
        # k is the type portion of the hash
        h[k] = {}
      end
      # Filter @notes based off of the id
      filter_hash(@_notes, options[:id]).each do |id, hash|
        # Filter hash based off of the type
        filter_hash(hash, options[:type]).each do |type, note|
          # Store the note into note_found
          notes_found[id][type] = note
        end
      end
      if notes_found.empty?
        return nil
      elsif notes_found.size == 1
        notes_found.values.first.values.first
      else
        return notes_found
      end
    end
741453
def reduce_accidentals(note):
    
    val = note_to_int(note[0])
    for token in note[1:]:
        if token == 'b':
            val -= 1
        elif token == '#':
            val += 1
        else:
            raise NoteFormatError("Unknown note format '%s'" % note)
    if val >= note_to_int(note[0]):
        return int_to_note(val%12)
    else:
        return int_to_note(val%12, 'b')
960188
def fixed_length(cls, l, allow_empty=False):
        """"""
        return cls(l, l, allow_empty=allow_empty)
1144653
function stringPadStart (str, targetLength, padString, UNDEFINED) {
  var rest = '' + str
  targetLength = targetLength >> 0
  padString = padString === UNDEFINED ? ' ' : '' + padString
  if (rest.padStart) {
    return rest.padStart(targetLength, padString)
  }
  if (targetLength > rest.length) {
    targetLength -= rest.length
    if (targetLength > padString.length) {
      padString += stringRepeat(padString, targetLength / padString.length)
    }
    return padString.slice(0, targetLength) + rest
  }
  return rest
}
1428
def _padleft(width, s, has_invisible=True):
    
    iwidth = width + len(s) - len(_strip_invisible(s)) if has_invisible else width
    fmt = "{0:>%ds}" % iwidth
    return fmt.format(s)
261180
def acit(rest):
	""
	word = rest.strip()
	res = util.lookup_acronym(word)
	if res is None:
		return "Arg!  I couldn't expand that..."
	else:
		return ' | '.join(res)
1373274
def appendNullPadding(str, blocksize=AES_blocksize):
  ''
  pad_len = paddingLength(len(str), blocksize)

  padding = '\0'*pad_len
  
  return str + padding
348555
function tokenizeAnnotatedBlockquote(eat, value, silent) {
    var self = this;
    var offsets = self.offset;
    var tokenizers = self.blockTokenizers;
    var interruptors = self.interruptBlockquote;
    var now = eat.now();
    var currentLine = now.line;
    var length = value.length;
    var values = [];
    var contents = [];
    var indents = [];
    var add;
    var index = 0;
    var character;
    var rest;
    var nextIndex;
    var content;
    var line;
    var startIndex;
    var prefixed;
    var exit;
    var blockType;

    while (index < length) {
        character = value.charAt(index);

        if (
            character !== space &&
            character !== tab &&
            !character.match(/[A-Z]/)
        ) {
            break;
        }

        // store the block type
        if (character.match(/[A-Z]/)) {
            switch (character) {
                case "A":
                    blockType = "aside";
                    break;
                case "W":
                    blockType = "warning";
                    break;
                case "T":
                    blockType = "tip";
                    break;
                case "E":
                    blockType = "error";
                    break;
                case "I":
                    blockType = "information";
                    break;
                case "Q":
                    blockType = "questions";
                    break;
                case "D":
                    blockType = "discussions";
                    break;
                case "X":
                    blockType = "exercises";
                    break;
                default:
                    blockType = "generic";
            }
        }

        index++;
    }

    if (value.charAt(index) !== greaterThan) {
        return;
    }

    if (silent) {
        return true;
    }

    index = 0;

    while (index < length) {
        nextIndex = value.indexOf(lineFeed, index);
        startIndex = index;
        prefixed = false;

        if (nextIndex === -1) {
            nextIndex = length;
        }

        while (index < length) {
            character = value.charAt(index);

            if (
                character !== space &&
                character !== tab &&
                !character.match(/[A-Z]/)
            ) {
                break;
            }

            index++;
        }

        if (value.charAt(index) === greaterThan) {
            index++;
            prefixed = true;

            if (value.charAt(index) === space) {
                index++;
            }
        } else {
            index = startIndex;
        }

        content = value.slice(index, nextIndex);

        if (!prefixed && !trim(content)) {
            index = startIndex;
            break;
        }

        if (!prefixed) {
            rest = value.slice(index);

            // Check if the following code contains a possible block.
            if (interrupt(interruptors, tokenizers, self, [eat, rest, true])) {
                break;
            }
        }

        line =
            startIndex === index ? content : value.slice(startIndex, nextIndex);

        indents.push(index - startIndex);
        values.push(line);
        contents.push(content);

        index = nextIndex + 1;
    }

    index = -1;
    length = indents.length;
    add = eat(values.join(lineFeed));

    while (++index < length) {
        offsets[currentLine] = (offsets[currentLine] || 0) + indents[index];
        currentLine++;
    }

    exit = self.enterBlock();
    contents = self.tokenizeBlock(contents.join(lineFeed), now);
    exit();

    return add({
        type: "blockquote",
        blockType: blockType,
        children: contents
    });
}
1276734
function stringifyIndented(value, chr, n) {
  return indent(JSON.stringify(value, null, n), chr, n).slice(chr.length * n)
}
187068
public static String notEmptyIfNotNull(String value, String name, String info) {
        if (value == null) {
            return value;
        }

        if (value.trim().length() == 0) {
            throw new IllegalArgumentException(name + " cannot be empty" + (info == null ? "" : ", " + info));
        }
        return value.trim();
    }
1101370
def rest_post(self, url, params=None, headers=None, auth=None, verify=True, cert=None):
        
        res = requests.post(url, params=params, headers=headers, auth=auth, verify=verify,
                            cert=cert)
        return res.text, res.status_code
237994
def write(str)
      while !str.empty?
        pre,mid,str = str.partition("\n")
        write_str(pre) unless pre.empty?
        writeln unless mid.empty?
      end
    end
727400
Rule IfieldLength() {
		return Sequence(String("[L:"),
				ZeroOrMore(WSP()).suppressNode(),
				NoteLengthStrict(),
				String("]"))
			.label(IfieldLength);
	}
1365340
def rest_of_string(self, offset=0):
        """"""
        if self.has_space(offset=offset):
            return self.string[self.pos + offset:]
        else:
            return ''