slapi_dn_normalize()

slapi_dn_normalize() converts a distinguished name (DN) to canonical format. It means no leading or trailing spaces, no spaces between components, and no spaces around the equals sign.

Note: A variable that is passed in as the DN argument is also converted in-place, therefore this API is deprecated. See slapi_dn_normalize_v3().
For example, for the following DN,
cn = John Doe, ou = Engineering , o = Darius
the function returns:
cn=john doe,ou=engineering,o=darius
Syntax
#include "slapi-plugin.h"
char *slapi_dn_normalize( char *dn );
Parameters
dn
The DN that you want to normalize.
Returns
The normalized DN.