gi-vte-2.91.27: Vte bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Vte.Structs.Regex

Contents

- Exported types
- Methods
  - Overloaded methods
  - jit
  - newForMatch
  - newForSearch
  - ref
  - substitute
  - unref

Description

No description available in the introspection data.

Synopsis

- newtype Regex = Regex (ManagedPtr Regex)
- regexJit :: (HasCallStack, MonadIO m) => Regex -> Word32 -> m ()
- regexNewForMatch :: (HasCallStack, MonadIO m) => Text -> Int64 -> Word32 -> m Regex
- regexNewForSearch :: (HasCallStack, MonadIO m) => Text -> Int64 -> Word32 -> m Regex
- regexRef :: (HasCallStack, MonadIO m) => Regex -> m Regex
- regexSubstitute :: (HasCallStack, MonadIO m) => Regex -> Text -> Text -> Word32 -> m Text
- regexUnref :: (HasCallStack, MonadIO m) => Regex -> m Regex

# Exported types

newtype Regex Source #

Memory-managed wrapper type.

Constructors

Regex (ManagedPtr Regex) |

#### Instances

Instances details

Eq Regex Source # |
Instance details Defined in GI.Vte.Structs.Regex Methods (==) :: Regex -> Regex -> Bool # (/=) :: Regex -> Regex -> Bool #
IsGValue Regex Source # | Convert `Regex` to and from `GValue` with `toGValue` and `fromGValue`.
Instance details Defined in GI.Vte.Structs.Regex Methods toGValue :: Regex -> IO GValue Source # fromGValue :: GValue -> IO Regex Source #
ManagedPtrNewtype Regex Source # |
Instance details Defined in GI.Vte.Structs.Regex Methods toManagedPtr :: Regex -> ManagedPtr Regex Source #
TypedObject Regex Source # |
Instance details Defined in GI.Vte.Structs.Regex Methods glibType :: IO GType Source #
GBoxed Regex Source # |
Instance details Defined in GI.Vte.Structs.Regex
HasParentTypes Regex Source # |
Instance details Defined in GI.Vte.Structs.Regex
type ParentTypes Regex Source # |
Instance details Defined in GI.Vte.Structs.Regex type ParentTypes Regex = '[] :: [Type]

# Methods

## Overloaded methods

## jit

regexJit Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Regex | `regex`: a `Regex`
-> Word32 |
-> m () | (Can throw `GError`)

If the platform supports JITing, JIT compiles `regex`.

## newForMatch

regexNewForMatch Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `pattern`: a regex pattern string
-> Int64 | `patternLength`: the length of `pattern` in bytes, or -1 if the string is NUL-terminated and the length is unknown
-> Word32 | `flags`: PCRE2 compile flags
-> m Regex | Returns: a newly created `Regex`, or `Nothing` with `error` filled in (Can throw `GError`)

Compiles `pattern` into a regex for use as a match regex with `terminalMatchAddRegex` or `vte_terminal_event_check_regex_simple()`.

See man:pcre2pattern(3) for information about the supported regex language.

The regex will be compiled using `PCRE2_UTF` and possibly other flags, in addition to the flags supplied in `flags`.

## newForSearch

regexNewForSearch Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `pattern`: a regex pattern string
-> Int64 | `patternLength`: the length of `pattern` in bytes, or -1 if the string is NUL-terminated and the length is unknown
-> Word32 | `flags`: PCRE2 compile flags
-> m Regex | Returns: a newly created `Regex`, or `Nothing` with `error` filled in (Can throw `GError`)

Compiles `pattern` into a regex for use as a search regex with `terminalSearchSetRegex`.

See man:pcre2pattern(3) for information about the supported regex language.

The regex will be compiled using `PCRE2_UTF` and possibly other flags, in addition to the flags supplied in `flags`.

## ref

regexRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Regex | `regex`: a `Regex`
-> m Regex | Returns: `regex`

Increases the reference count of `regex` by one.

## substitute

regexSubstitute Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Regex | `regex`: a `Regex`
-> Text | `subject`: the subject string
-> Text | `replacement`: the replacement string
-> Word32 | `flags`: PCRE2 match flags
-> m Text | Returns: the substituted string, or `Nothing` if an error occurred (Can throw `GError`)

See man:pcre2api(3) on `pcre2_substitute()` for more information.

Since: 0.56

## unref

regexUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Regex | `regex`: a `Regex`
-> m Regex | Returns: `Nothing`

Decreases the reference count of `regex` by one, and frees `regex` if the refcount reaches zero.