add a missing section header table index conversion
[tangerine.git] / compiler / clib / strxfrm.c
blob51fde45b1ed0a07a24b14bf084662b1d9d4db7a0
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function strcoll().
6 */
8 #include <aros/debug.h>
10 /*****************************************************************************
12 NAME */
13 #include <string.h>
15 size_t strxfrm (
17 /* SYNOPSIS */
18 char * restrict dst,
19 const char * restrict src,
20 size_t n)
22 /* FUNCTION
23 The strxfrm() function transforms a null-terminated string pointed to by
24 src according to the current locale collation if any, then copies the
25 transformed string into dst. Not more than n characters are copied into
26 dst, including the terminating null character added. If n is set to 0
27 (it helps to determine an actual size needed for transformation), dst is
28 permitted to be a NULL pointer.
30 Comparing two strings using strcmp() after strxfrm() is equal to compar-
31 ing two original strings with strcoll().
33 INPUTS
34 dst - the destination string's buffer
35 src - the source string
36 n - the size of the dst buffer.
38 RESULT
39 Upon successful completion, strxfrm() returns the length of the trans-
40 formed string not including the terminating null character. If this
41 value is n or more, the contents of dst are indeterminate.
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 INTERNALS
53 ******************************************************************************/
55 # warning Implement strxfrm() properly
56 AROS_FUNCTION_NOT_IMPLEMENTED("arosc");
58 size_t srclen = strlen(src);
59 strncpy(dst, src, n);
61 return srclen;
62 } /* strxfrm */