summaryrefslogtreecommitdiff
path: root/glib/gregex.c
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2015-04-15 15:00:18 +0200
committerSébastien Wilmet <swilmet@gnome.org>2016-01-28 18:49:28 +0100
commitf14052461b47653213cbcbbca8eaba16ee38ca32 (patch)
tree3a6315d703a2d66e0de958ccc4c140465e6f2ed6 /glib/gregex.c
parenta4ed89bf75190631087596be22f9eb10dc6e53ef (diff)
downloadglib-f14052461b47653213cbcbbca8eaba16ee38ca32.tar.gz
docs: GRegex: @start_position is in bytes
The start_position arguments are passed to pcre_exec() as the startoffset, which is in bytes (not characters). I had recently a doubt about this, so it's better to document it. https://bugzilla.gnome.org/show_bug.cgi?id=747927
Diffstat (limited to 'glib/gregex.c')
-rw-r--r--glib/gregex.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/glib/gregex.c b/glib/gregex.c
index 745eb99de..9f787a5c4 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -1717,7 +1717,7 @@ g_regex_match (const GRegex *regex,
* @regex: a #GRegex structure from g_regex_new()
* @string: (array length=string_len): the string to scan for matches
* @string_len: the length of @string, or -1 if @string is nul-terminated
- * @start_position: starting index of the string to match
+ * @start_position: starting index of the string to match, in bytes
* @match_options: match options
* @match_info: (out) (allow-none): pointer to location where to store
* the #GMatchInfo, or %NULL if you do not need it
@@ -1848,7 +1848,7 @@ g_regex_match_all (const GRegex *regex,
* @regex: a #GRegex structure from g_regex_new()
* @string: (array length=string_len): the string to scan for matches
* @string_len: the length of @string, or -1 if @string is nul-terminated
- * @start_position: starting index of the string to match
+ * @start_position: starting index of the string to match, in bytes
* @match_options: match options
* @match_info: (out) (allow-none): pointer to location where to store
* the #GMatchInfo, or %NULL if you do not need it
@@ -2119,7 +2119,7 @@ g_regex_split (const GRegex *regex,
* @regex: a #GRegex structure
* @string: (array length=string_len): the string to split with the pattern
* @string_len: the length of @string, or -1 if @string is nul-terminated
- * @start_position: starting index of the string to match
+ * @start_position: starting index of the string to match, in bytes
* @match_options: match time option flags
* @max_tokens: the maximum number of tokens to split @string into.
* If this is less than 1, the string is split completely
@@ -2749,7 +2749,7 @@ interpolation_list_needs_match (GList *list)
* @regex: a #GRegex structure
* @string: (array length=string_len): the string to perform matches against
* @string_len: the length of @string, or -1 if @string is nul-terminated
- * @start_position: starting index of the string to match
+ * @start_position: starting index of the string to match, in bytes
* @replacement: text to replace each match with
* @match_options: options for the match
* @error: location to store the error occurring, or %NULL to ignore errors
@@ -2840,7 +2840,7 @@ literal_replacement (const GMatchInfo *match_info,
* @regex: a #GRegex structure
* @string: (array length=string_len): the string to perform matches against
* @string_len: the length of @string, or -1 if @string is nul-terminated
- * @start_position: starting index of the string to match
+ * @start_position: starting index of the string to match, in bytes
* @replacement: text to replace each match with
* @match_options: options for the match
* @error: location to store the error occurring, or %NULL to ignore errors
@@ -2883,7 +2883,7 @@ g_regex_replace_literal (const GRegex *regex,
* @regex: a #GRegex structure from g_regex_new()
* @string: (array length=string_len): string to perform matches against
* @string_len: the length of @string, or -1 if @string is nul-terminated
- * @start_position: starting index of the string to match
+ * @start_position: starting index of the string to match, in bytes
* @match_options: options for the match
* @eval: a function to call for each match
* @user_data: user data to pass to the function