Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * <<strxfrm>>---transform string
21 * size_t strxfrm(char *<[s1]>, const char *<[s2]>, size_t <[n]>);
24 * size_t strxfrm(<[s1]>, <[s2]>, <[n]>);
28 * This function transforms the string pointed to by <[s2]> and
29 * places the resulting string into the array pointed to by
30 * <[s1]>. The transformation is such that if the <<strcmp>>
31 * function is applied to the two transformed strings, it returns
32 * a value greater than, equal to, or less than zero,
33 * correspoinding to the result of a <<strcoll>> function applied
34 * to the same two original strings.
35 * No more than <[n]> characters are placed into the resulting
36 * array pointed to by <[s1]>, including the terminating null
37 * character. If <[n]> is zero, <[s1]> may be a null pointer. If
38 * copying takes place between objects that overlap, the behavior
40 * With a C locale, this function just copies.
42 * The <<strxfrm>> function returns the length of the transformed string
43 * (not including the terminating null character). If the value returned
44 * is <[n]> or more, the contents of the array pointed to by
45 * <[s1]> are indeterminate.
47 * <<strxfrm>> is ANSI C.
48 * <<strxfrm>> requires no supporting OS subroutines.
60 Transform string using locale settings.
61 Copies the first num characters of src to dest performing the apropiate
62 transformations for the current locale settings if needed.
63 No null-character is implicitly appended to dest after copying process.
64 So dest may not be null-terminated if no null-caracters are copied from src.
65 If num is greater than the length of src, dest is padded with zeros until num.
66 The behavor of this function is the same as strncpy but performing locale
67 character transformations.
68 @return The length of the transformed string without the null-character terminator.
69 @param s1 Destination string. Space allocated should be at least num characters long.
70 @param s2 Null-terminated string containing string to be transformed.
71 @param n Number of characters to be transformed and stored in dest.
74 strxfrm (char *s1, const char *s2, size_t n)
78 while (n-- > 0 && *s2)