mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-11 19:59:32 +00:00
Add shorthand initialization
This commit is contained in:
@@ -282,6 +282,8 @@ proc initRegex*(pattern: string, options = "Sx"): Regex =
|
||||
raise StudyError(msg: $errorMsg)
|
||||
|
||||
result.captureNameToId = result.getNameToNumberTable()
|
||||
|
||||
proc re*(pattern: string, options = "Sx"): Regex = initRegex(pattern, options)
|
||||
# }}}
|
||||
|
||||
proc matchImpl(str: string, pattern: Regex, start, endpos: int, flags: int): RegexMatch =
|
||||
|
||||
Reference in New Issue
Block a user