Function

Purplenormalize

since: 2.0

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.

Available since: 2.0

Parameters

account

Type: 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

Type: 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

Type: 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.