]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/cwchar.cpp
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / common / cwchar.cpp
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 2001, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 * file name: cwchar.c
11 * encoding: UTF-8
12 * tab size: 8 (not used)
13 * indentation:4
14 *
15 * created on: 2001may25
16 * created by: Markus W. Scherer
17 */
18
19 #include "unicode/utypes.h"
20
21 #if !U_HAVE_WCSCPY
22
23 #include "cwchar.h"
24
25 U_CAPI wchar_t *uprv_wcscat(wchar_t *dst, const wchar_t *src) {
26 wchar_t *start=dst;
27 while(*dst!=0) {
28 ++dst;
29 }
30 while((*dst=*src)!=0) {
31 ++dst;
32 ++src;
33 }
34 return start;
35 }
36
37 U_CAPI wchar_t *uprv_wcscpy(wchar_t *dst, const wchar_t *src) {
38 wchar_t *start=dst;
39 while((*dst=*src)!=0) {
40 ++dst;
41 ++src;
42 }
43 return start;
44 }
45
46 U_CAPI size_t uprv_wcslen(const wchar_t *src) {
47 const wchar_t *start=src;
48 while(*src!=0) {
49 ++src;
50 }
51 return src-start;
52 }
53
54 #endif
55