[glib] docs: GRegex: @start_position is in bytes



commit f14052461b47653213cbcbbca8eaba16ee38ca32
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Apr 15 15:00:18 2015 +0200

    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

 glib/gregex.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/glib/gregex.c b/glib/gregex.c
index 745eb99..9f787a5 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]