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 * <<strncat>>---concatenate strings
21 * char *strncat(char *<[dst]>, const char *<[src]>, size_t <[length]>);
24 * char *strncat(<[dst]>, <[src]>, <[length]>)
28 * <<strncat>> appends not more than <[length]> characters from
29 * the string pointed to by <[src]> (including the terminating
30 * null character) to the end of the string pointed to by
31 * <[dst]>. The initial character of <[src]> overwrites the null
32 * character at the end of <[dst]>. A terminating null character
33 * is always appended to the result
35 * Note that a null is always appended, so that if the copy is
36 * limited by the <[length]> argument, the number of characters
37 * appended to <[dst]> is <<n + 1>>.
39 * This function returns the initial value of <[dst]>
41 * <<strncat>> is ANSI C.
42 * <<strncat>> requires no supporting OS subroutines.
54 Append substring to string.
55 Appends num characters of src string to dest string.
56 If the terminating null-character appears in src string
57 before num character have been appended, the function appends
58 the null-character to dest and ends.
59 The terminating null character in dest is overwritten by the first character of src.
60 The resulting string includes a null-character at end.
61 @return s1 is returned
62 @param s1 Pointer to a null-terminated string with enough space allocated to contain src
64 @param s2 Null-terminated string containing characters to be appended.
65 @param n Number of characters to be appended from src to dest.
68 strncat (char *s1, const char *s2, size_t n)
74 while (n-- != 0 && (*s1++ = *s2++)!=0)