Ags.RegexUtil¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
app_encoding |
r/w |
||
compile_flags |
r/w |
||
converter |
r/w |
||
encoding |
r/w |
||
is_unichar |
r/w |
||
is_unichar2 |
r/w |
||
regex |
r/w |
||
regex_str |
r/w |
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Ags.RegexUtil¶
- classmethod alloc(app_encoding, encoding, is_unichar, is_unichar2)¶
- Parameters:
- Returns:
a new
Ags.RegexUtil
-struct- Return type:
Allocate
Ags.RegexUtil
-structNew in version 6.3.2.
- compile(regex_str, compile_flags)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Compile regex_str by respecting compile_flags.
New in version 6.3.2.
- copy()¶
- Returns:
a pointer of the new
Ags.RegexUtil
-struct- Return type:
Create a copy of self.
New in version 6.3.2.
- execute(str, match_count, match, execute_flags)¶
- Parameters:
str (
str
) – the input stringmatch_count (
int
) – the match countmatch (
Ags.RegexMatch
) – the regex matchexecute_flags (
int
) – the execute flags
- Raises:
- Returns:
- Return type:
Execute self and fill match.
New in version 6.3.2.
- execute_unichar(str, match_count, match, execute_flags)¶
- Parameters:
str (
str
) – the input stringmatch_count (
int
) – the match countmatch (
Ags.RegexMatch
) – the regex matchexecute_flags (
int
) – the execute flags
- Raises:
- Returns:
- Return type:
Execute self and fill match.
New in version 6.3.2.
- execute_unichar2(str, match_count, match, execute_flags)¶
- Parameters:
str (
int
) – the input stringmatch_count (
int
) – the match countmatch (
Ags.RegexMatch
) – the regex matchexecute_flags (
int
) – the execute flags
- Raises:
- Returns:
- Return type:
Execute self and fill match.
New in version 6.3.2.
- free()¶
Free the memory of self.
New in version 6.3.2.
- get_app_encoding()¶
- Returns:
the application encoding
- Return type:
Get application encoding of self.
New in version 6.3.2.
- match_free(match)¶
- Parameters:
match (
Ags.RegexMatch
) – the regex match
Free match.
New in version 6.3.2.
- match_get_offset(match, nth_match)¶
- Parameters:
match (
Ags.RegexMatch
) – the regex matchnth_match (
int
) – the match position
- Returns:
- start_match_offset:
the start match offset
- end_match_offset:
the end match offset
- Return type:
Get offset of match.
New in version 6.3.2.