MCPcopy
hub / github.com/witheve/Eve / match

Function match

src/commonmark.js:1167–1175  ·  view source on GitHub ↗
(re)

Source from the content-addressed store, hash-verified

1165// If re matches at current position in the subject, advance
1166// position in subject and return the match; otherwise return null.
1167var match = function(re) {
1168 var m = re.exec(this.subject.slice(this.pos));
1169 if (m === null) {
1170 return null;
1171 } else {
1172 this.pos += m.index + m[0].length;
1173 return m[0];
1174 }
1175};
1176
1177// Returns the code for the character at the current subject position, or -1
1178// there are no more characters.

Callers 1

codemirror.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected