MCPcopy Create free account

hub / github.com/BurntSushi/regexp / functions

Functions182 in github.com/BurntSushi/regexp

↓ 64 callersMethodlen
(&self)
src/re.rs:726
↓ 37 callersMethodpush
(&mut self, ast: ~Ast)
src/parse.rs:304
↓ 33 callersMethoderr
(&self, msg: &str)
src/parse.rs:890
↓ 29 callersMethoditer
Creates an iterator of all the capture groups in order of appearance in the regular expression.
src/re.rs:684
↓ 25 callersMethodunwrap
(self)
src/parse.rs:155
↓ 15 callersMethodslice
(&self, start: uint, end: uint)
src/parse.rs:912
↓ 13 callersMethodpeek_is
(&self, offset: uint, is: char)
src/parse.rs:904
↓ 13 callersMethodpush
(&mut self, x: Inst)
src/compile.rs:229
↓ 12 callersMethodis_match
Returns true if and only if the regex matches the string given. # Example Test if some text contains at least one word with exactly 13 characters:
src/re.rs:168
↓ 10 callersMethodclone
(&self)
src/re.rs:130
↓ 10 callersMethodexpect
(&mut self, expected: char)
src/parse.rs:283
↓ 9 callersMethodcur
(&self)
src/parse.rs:908
↓ 8 callersMethodnoteof
(&mut self, expected: &str)
src/parse.rs:276
↓ 7 callersMethodreplace_all
Replaces all non-overlapping matches in `text` with the replacement provided. This is the same as calling `replacen` with `limit` set to `0`. See the
src/re.rs:466
↓ 7 callersMethodset_split
(&mut self, i: InstIdx, pc1: InstIdx, pc2: InstIdx)
src/compile.rs:247
↓ 7 callersMethodsplit
Returns an iterator of substrings of `text` delimited by a match of the regular expression. Namely, each element of the iterator corresponds to text t
src/re.rs:346
↓ 6 callersFunctionis_word
Returns true if the character is a word character, according to the (Unicode friendly) Perl character class '\w'. Note that this is only use for testi
src/vm.rs:510
↓ 6 callersMethodpop_ast
(&mut self)
src/parse.rs:297
↓ 5 callersMethodat
Returns the matched string for the capture group `i`. If `i` isn't a valid capture group or didn't match anything, then the empty string is returned.
src/re.rs:658
↓ 5 callersFunctionbench_assert_match
(b: &mut Bencher, re: Regex, text: &str)
src/test/bench.rs:16
↓ 5 callersFunctionhas_match
(caps: &CaptureLocs)
src/re.rs:868
↓ 5 callersMethodpos
(&self, c: char)
src/parse.rs:885
↓ 4 callersMethodadd
(&self, nlist: &mut Threads, pc: uint, groups: &mut [Option<uint>])
src/vm.rs:246
↓ 4 callersMethodempty_split
(&mut self)
src/compile.rs:237
↓ 4 callersFunctionexec
(re: &Regex, which: MatchKind, input: &str)
src/re.rs:855
↓ 4 callersFunctiongroup
(letters)
regex-unicode-tables.py:83
↓ 4 callersMethodparen
(&self)
src/parse.rs:112
↓ 4 callersMethodpeek
(&self, offset: uint)
src/parse.rs:897
↓ 4 callersMethodpos_last
Searches the stack (starting at the top) until it finds an expression for which `pred` returns true. The index of that expression in the stack is retu
src/parse.rs:802
↓ 4 callersFunctionranges_to_rust
(rs)
regex-unicode-tables.py:101
↓ 3 callersMethodbar
(&self)
src/parse.rs:148
↓ 3 callersMethodconcat
concat starts at `from` in the parser's stack and concatenates all expressions up to the top of the stack. The resulting concatenation is then pushed
src/parse.rs:824
↓ 3 callersMethodcontains
(&self, pc: uint)
src/vm.rs:485
↓ 3 callersMethoddummy_expr
Creates an expression with a dummy node ID given an underlying `ast::Expr_`.
src/macro.rs:623
↓ 3 callersFunctionexec_slice
(re: &Regex, which: MatchKind, input: &str, s: uint, e: uint)
src/re.rs:859
↓ 3 callersMethodfind_iter
Returns an iterator for each successive non-overlapping match in `text`, returning the start and end byte indices with respect to `text`. # Example
src/re.rs:226
↓ 3 callersMethodis_greedy
(&self)
src/parse.rs:84
↓ 3 callersFunctionis_valid_unicode
(n)
regex-unicode-tables.py:48
↓ 3 callersFunctionmake_fasta
( wr: &mut W, header: &str, mut it: I, mut n: uint)
benchmark/regex-dna/shootout-fasta.rs:61
↓ 3 callersMethodnext_char
(&mut self)
src/parse.rs:292
↓ 3 callersMethodparse_uint
(&self, s: &str)
src/parse.rs:869
↓ 3 callersMethodpos
Returns the start and end positions of the Nth capture group. Returns `None` if `i` is not a valid capture group or if the capture group did not match
src/re.rs:646
↓ 3 callersMethodvec_expr
Converts `xs` to a `[x1, x2, .., xN]` expression by calling `to_expr` on each element in `xs`.
src/macro.rs:611
↓ 2 callersMethodalternate
concat starts at `from` in the parser's stack and alternates all expressions up to the top of the stack. The resulting alternation is then pushed on t
src/parse.rs:837
↓ 2 callersMethodarm_inst
Creates a match arm for the instruction at `pc` with the expression `body`.
src/macro.rs:574
↓ 2 callersFunctionas_4byte_uni
(n)
regex-unicode-tables.py:39
↓ 2 callersMethodbuild_from
build_from combines all AST elements starting at 'from' in the parser's stack using 'mk' to combine them. If any such element is not an AST then it is
src/parse.rs:851
↓ 2 callersMethodchar_eq
(&self, casei: bool, textc: Option<char>, regc: char)
src/vm.rs:326
↓ 2 callersMethodchar_from_u32
(&self, n: u32)
src/parse.rs:877
↓ 2 callersMethodchar_is
(&self, textc: Option<char>, regc: char)
src/vm.rs:337
↓ 2 callersFunctioncombine_ranges
Given an unordered collection of character ranges, combine_ranges returns an ordered sequence of character ranges where no two ranges overlap. They ar
src/parse.rs:920
↓ 2 callersMethodempty
(&mut self)
src/vm.rs:491
↓ 2 callersMethodempty_jump
(&mut self)
src/compile.rs:258
↓ 2 callersFunctionfind_class
(classes: NamedClasses, name: &str)
src/parse.rs:986
↓ 2 callersMethodget_next_greedy
Peeks at the next character and returns whether it's ungreedy or not. If it is, then the next character is consumed.
src/parse.rs:785
↓ 2 callersMethodis_begin
(&self)
src/vm.rs:413
↓ 2 callersMethodis_end
(&self)
src/vm.rs:418
↓ 2 callersFunctionis_punct
(c: char)
src/parse.rs:973
↓ 2 callersFunctionload_file
Load the file f into the string s. */
benchmark/regex-dna/regex-dna.c:226
↓ 2 callersMethodmatch_insts
Builds a `match pc { ... }` expression from a list of arms, specifically for matching the current program counter with an instruction. A wild-card arm
src/macro.rs:566
↓ 2 callersMethodnum_captures
Returns the total number of capture groups in the regular expression. This includes the zeroth capture.
src/compile.rs:124
↓ 2 callersMethodparse_escape
Parses all escape sequences. Assumes that '\' is the current character.
src/parse.rs:574
↓ 2 callersMethodparse_hex_digits
Parses `s` as a hexadecimal number.
src/parse.rs:695
↓ 2 callersFunctionread_cats
(f)
regex-unicode-tables.py:52
↓ 2 callersFunctionread_scripts
(f)
regex-unicode-tables.py:63
↓ 2 callersFunctionread_tests
(f)
regex-match-tests.py:23
↓ 2 callersFunctionregcount
Return the number of times the regular expression "regexp_cstr" * uniquely matches against the input string "s". */
benchmark/regex-dna/regex-dna.c:115
↓ 2 callersFunctionregsub
Substitute each occurrence of the regular expression "regex" in "s" * with "subst". The result is returned in a newly allocate string * that must b
benchmark/regex-dna/regex-dna.c:179
↓ 2 callersMethodreplacen
Replaces at most `limit` non-overlapping matches in `text` with the replacement provided. If `limit` is 0, then all non-overlapping matches are replac
src/re.rs:476
↓ 2 callersFunctionrun
(writer: &mut W)
benchmark/regex-dna/shootout-fasta.rs:77
↓ 2 callersMethodset
(&mut self, ic: uint)
src/vm.rs:371
↓ 2 callersMethodset_jump
(&mut self, i: InstIdx, pc: InstIdx)
src/compile.rs:267
↓ 2 callersMethodsplitn
Returns an iterator of at most `limit` substrings of `text` delimited by a match of the regular expression. (A `limit` of `0` will return no substring
src/re.rs:376
↓ 2 callersMethodtry_parse_ascii
Tries to parse an ASCII character class of the form [:name:]. If successful, returns an AST character class corresponding to name and moves the parser
src/parse.rs:447
↓ 2 callersMethodwild_arm_expr
Creates a wild-card match arm with the expression `body`.
src/macro.rs:588
↓ 1 callersMethodadd_insts
Generates code for the `add` method, which is responsible for adding zero-width states to the next queue of states to visit.
src/macro.rs:320
↓ 1 callersMethodadvance
(&mut self)
src/vm.rs:397
↓ 1 callersMethodcapture
(&self)
src/parse.rs:126
↓ 1 callersMethodcapture_name
(&self)
src/parse.rs:134
↓ 1 callersMethodcaptures_iter
Returns an iterator over all the non-overlapping capture groups matched in `text`. This is operationally the same as `find_iter` (except it yields inf
src/re.rs:316
↓ 1 callersMethodcheck_prefix
Generates code for checking a literal prefix of the search string. The code is only generated if the regex *has* a literal prefix. Otherwise, a no-op
src/macro.rs:542
↓ 1 callersFunctionclass_cmp
(casei: bool, mut textc: char, (mut start, mut end): (char, char))
src/vm.rs:538
↓ 1 callersMethodcode
(&mut self)
src/macro.rs:110
↓ 1 callersMethodcompile
(&mut self, ast: ~parse::Ast)
src/compile.rs:147
↓ 1 callersFunctioncountMatches
(pat string, bytes []byte)
benchmark/regex-dna/regex-dna.go:47
↓ 1 callersFunctioncount_matches
(seq: &str, variant: &Regex)
benchmark/regex-dna/regex-dna-single.rs:15
↓ 1 callersFunctioncount_matches
(seq: &str, variant: &Regex)
benchmark/regex-dna/regex-dna.rs:26
↓ 1 callersMethodexpand
Expands all instances of `$name` in `text` to the corresponding capture group `name`. `name` may be an integer corresponding to the index of the capt
src/re.rs:707
↓ 1 callersFunctionexpand_cat
(c)
regex-unicode-tables.py:44
↓ 1 callersFunctionfind_prefix
(needle: &[u8], haystack: &[u8])
src/vm.rs:566
↓ 1 callersMethodflags
(&self)
src/parse.rs:119
↓ 1 callersMethodgen
(&mut self)
benchmark/regex-dna/shootout-fasta.rs:33
↓ 1 callersFunctionget_cpu_count
Return the number of cpus. If an error occurs, 0 cpus will be * reported. There are other ways to do this, but this is a program * to test regexp
benchmark/regex-dna/regex-dna.c:560
↓ 1 callersFunctionget_variant_index
This is a helper function for process_variant_worker() which is the * start routine for the threads that count how many times a variant * matches th
benchmark/regex-dna/regex-dna.c:276
↓ 1 callersMethodgroups
(&'r mut self, i: uint)
src/vm.rs:501
↓ 1 callersFunctiongroups_to_rust
(groups)
regex-unicode-tables.py:106
↓ 1 callersMethodis_word_boundary
Returns true if and only if the current position is a word boundary. (Ignoring the range of the input to search.)
src/vm.rs:422
↓ 1 callersFunctionmain
()
benchmark/regex-dna/regex-dna.py:19
↓ 1 callersMethodmatch_class
Translates a character class into a match expression. This avoids a binary search (and is hopefully replaced by a jump table).
src/macro.rs:514
↓ 1 callersMethodname
Returns the matched string for the capture group named `name`. If `name` isn't a valid capture group or didn't match anything, then the empty string i
src/re.rs:670
next →1–100 of 182, ranked by callers