forked from rescript-lang/rescript-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCore__RegExp.res
23 lines (19 loc) · 861 Bytes
/
Core__RegExp.res
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
type t = Js.Re.t
module Result = {
type t = array<string>
@get_index external fullMatch: (t, @as(0) _) => string = ""
@send external matches: (t, @as(1) _) => array<string> = "slice"
@get external index: t => int = "index"
@get external input: t => string = "input"
}
@new external fromString: string => t = "RegExp"
@new external fromStringWithFlags: (string, ~flags: string) => t = "RegExp"
@send external test: (t, string) => bool = "test"
@return(nullable) @send external exec: (t, string) => option<Result.t> = "exec"
@get external lastIndex: t => int = "lastIndex"
@get external ignoreCase: t => bool = "ignoreCase"
@get external global: t => bool = "global"
@get external multiline: t => bool = "multiline"
@get external source: t => string = "source"
@get external sticky: t => bool = "sticky"
@get external unicode: t => bool = "unicode"