cwchar.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include "unicode/utypes.h"
  19. #if !U_HAVE_WCSCPY
  20. #include "cwchar.h"
  21. U_CAPI wchar_t *uprv_wcscat(wchar_t *dst, const wchar_t *src) {
  22. wchar_t *start=dst;
  23. while(*dst!=0) {
  24. ++dst;
  25. }
  26. while((*dst=*src)!=0) {
  27. ++dst;
  28. ++src;
  29. }
  30. return start;
  31. }
  32. U_CAPI wchar_t *uprv_wcscpy(wchar_t *dst, const wchar_t *src) {
  33. wchar_t *start=dst;
  34. while((*dst=*src)!=0) {
  35. ++dst;
  36. ++src;
  37. }
  38. return start;
  39. }
  40. U_CAPI size_t uprv_wcslen(const wchar_t *src) {
  41. const wchar_t *start=src;
  42. while(*src!=0) {
  43. ++src;
  44. }
  45. return src-start;
  46. }
  47. #endif