X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=lib%2Fstring%2Ftcsncat.h;fp=lib%2Fstring%2Ftcsncat.h;h=146de33e8f870f5cefa74373907fb04234ea5815;hp=0000000000000000000000000000000000000000;hb=a3df8bf1429570e0bd6c6428f6ed80073578cf4b;hpb=7c0db166f81fbe8c8b913d7f26048e337d383605 diff --git a/lib/string/tcsncat.h b/lib/string/tcsncat.h new file mode 100644 index 0000000..146de33 --- /dev/null +++ b/lib/string/tcsncat.h @@ -0,0 +1,30 @@ +/* $Id$ + */ + +#include +#include + +_TCHAR * _tcsncat(_TCHAR * dst, const _TCHAR * src, size_t n) +{ + if(n != 0) + { + _TCHAR * d = dst; + const _TCHAR * s = src; + + while(*d != 0) ++ d; + + do + { + if((*d = *s++) == 0) break; + + ++ d; + } + while (--n != 0); + + *d = 0; + } + + return dst; +} + +/* EOF */