Function

Purplenormalize

Declaration [src]

const char*
purple_normalize (
  PurpleAccount* account,
  const char* str
)

Description [src]

Normalizes a string, so that it is suitable for comparison.

The returned string will point to a static buffer, so if the string is intended to be kept long-term, you must g_strdup() it. Also, calling normalize() twice in the same line will lead to problems.

Parameters

account PurpleAccount
 

The account the string belongs to, or NULL if you do not know the account. If you use NULL, the string will still be normalized, but if the protocol uses a custom normalization function then the string may not be normalized correctly.

 The data is owned by the caller of the function.
str const char*
 

The string to normalize.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Return value

Returns: const char*
 

A pointer to the normalized version stored in a static buffer.

 The data is owned by the called function.
 The value is a NUL terminated UTF-8 string.