mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-07 18:06:15 +01:00
gstrfuncs: Fix up gtk-doc warnings
This commit is contained in:
parent
71d842674f
commit
26b4f6b41c
@ -72,19 +72,19 @@
|
|||||||
* <literal><glib/gprintf.h></literal> in order to use the GLib
|
* <literal><glib/gprintf.h></literal> in order to use the GLib
|
||||||
* printf() functions.
|
* printf() functions.
|
||||||
*
|
*
|
||||||
* <para id="string-precision">While you may use the printf() functions
|
* <para id="string-precision">
|
||||||
* to format UTF-8 strings, notice that the precision of a
|
* While you may use the printf() functions to format UTF-8 strings,
|
||||||
* <literal>%Ns</literal> parameter is interpreted as the
|
* notice that the precision of a %Ns parameter is interpreted
|
||||||
* number of bytes, not characters to print. On top of that, the GNU
|
* as the number of bytes, not characters to print. On top of that,
|
||||||
* libc implementation of the printf() functions has the "feature" that
|
* the GNU libc implementation of the printf() functions has the
|
||||||
* it checks that the string given for the <literal>%Ns</literal>
|
* "feature" that it checks that the string given for the %Ns
|
||||||
* parameter consists of a whole number of characters in the current
|
* parameter consists of a whole number of characters in the current
|
||||||
* encoding. So, unless you are sure you are always going to be in an
|
* encoding. So, unless you are sure you are always going to be in an
|
||||||
* UTF-8 locale or your know your text is restricted to ASCII, avoid
|
* UTF-8 locale or your know your text is restricted to ASCII, avoid
|
||||||
* using <literal>%Ns</literal>. If your intention is to format
|
* using %Ns. If your intention is to format strings for a
|
||||||
* strings for a certain number of columns, then
|
* certain number of columns, then %Ns is not a correct solution
|
||||||
* <literal>%Ns</literal> is not a correct solution anyway, since it
|
* anyway, since it fails to take wide characters (see g_unichar_iswide())
|
||||||
* fails to take wide characters (see g_unichar_iswide()) into account.
|
* into account.
|
||||||
* </para>
|
* </para>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -668,12 +668,12 @@ g_strtod (const gchar *nptr,
|
|||||||
* To convert from a #gdouble to a string in a locale-insensitive
|
* To convert from a #gdouble to a string in a locale-insensitive
|
||||||
* way, use g_ascii_dtostr().
|
* way, use g_ascii_dtostr().
|
||||||
*
|
*
|
||||||
* If the correct value would cause overflow, plus or minus <literal>HUGE_VAL</literal>
|
* If the correct value would cause overflow, plus or minus %HUGE_VAL
|
||||||
* is returned (according to the sign of the value), and <literal>ERANGE</literal> is
|
* is returned (according to the sign of the value), and %ERANGE is
|
||||||
* stored in <literal>errno</literal>. If the correct value would cause underflow,
|
* stored in %errno. If the correct value would cause underflow,
|
||||||
* zero is returned and <literal>ERANGE</literal> is stored in <literal>errno</literal>.
|
* zero is returned and %ERANGE is stored in %errno.
|
||||||
*
|
*
|
||||||
* This function resets <literal>errno</literal> before calling strtod() so that
|
* This function resets %errno before calling strtod() so that
|
||||||
* you can reliably detect overflow and underflow.
|
* you can reliably detect overflow and underflow.
|
||||||
*
|
*
|
||||||
* Return value: the #gdouble value.
|
* Return value: the #gdouble value.
|
||||||
@ -1506,22 +1506,22 @@ g_ascii_strup (const gchar *str,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_str_is_ascii:
|
* g_str_is_ascii:
|
||||||
* @string: a string
|
* @str: a string
|
||||||
*
|
*
|
||||||
* Determines if a string is pure ASCII. A string is pure ASCII if it
|
* Determines if a string is pure ASCII. A string is pure ASCII if it
|
||||||
* contains no bytes with the high bit set.
|
* contains no bytes with the high bit set.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if @string is ascii
|
* Returns: %TRUE if @str is ASCII
|
||||||
*
|
*
|
||||||
* Since: 2.40
|
* Since: 2.40
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_str_is_ascii (const gchar *string)
|
g_str_is_ascii (const gchar *str)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; string[i]; i++)
|
for (i = 0; str[i]; i++)
|
||||||
if (string[i] & 0x80)
|
if (str[i] & 0x80)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -219,8 +219,7 @@ gchar* g_strdup_printf (const gchar *format,
|
|||||||
...) G_GNUC_PRINTF (1, 2) G_GNUC_MALLOC;
|
...) G_GNUC_PRINTF (1, 2) G_GNUC_MALLOC;
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
gchar* g_strdup_vprintf (const gchar *format,
|
gchar* g_strdup_vprintf (const gchar *format,
|
||||||
va_list args) G_GNUC_PRINTF(1, 0)
|
va_list args) G_GNUC_PRINTF(1, 0) G_GNUC_MALLOC;
|
||||||
G_GNUC_MALLOC;
|
|
||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
gchar* g_strndup (const gchar *str,
|
gchar* g_strndup (const gchar *str,
|
||||||
gsize n) G_GNUC_MALLOC;
|
gsize n) G_GNUC_MALLOC;
|
||||||
|
Loading…
Reference in New Issue
Block a user