]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/nptrans.cpp
ICU-62123.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / nptrans.cpp
index 27345adf62e79c298072be76ac8158742322dc60..6c1c7be3361f3063040b90694cced3acfb35947d 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
  *******************************************************************************
  *
@@ -6,7 +8,7 @@
  *
  *******************************************************************************
  *   file name:  nptrans.h
- *   encoding:   US-ASCII
+ *   encoding:   UTF-8
  *   tab size:   8 (not used)
  *   indentation:4
  *
@@ -172,7 +174,7 @@ int32_t NamePrepTransform::map(const UChar* src, int32_t srcLength,
     }
     // check if there is enough room in the output
     if(bufLen < destCapacity){
-        uprv_memcpy(dest,buffer,bufLen*U_SIZEOF_UCHAR);
+        u_memcpy(dest, buffer, bufLen);
     }
 
     return u_terminateUChars(dest, destCapacity, bufLen, &status);
@@ -264,7 +266,7 @@ int32_t NamePrepTransform::process( const UChar* src, int32_t srcLength,
     }
 
     if(b1Len <= destCapacity){
-        uprv_memmove(dest,b1, b1Len*U_SIZEOF_UCHAR);
+        u_memmove(dest, b1, b1Len);
     }
 
 CLEANUP: