arudradey's picture
download
raw
879 Bytes
//===-- Implementation of stpcpy ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "src/string/stpcpy.h"
#include "src/__support/macros/config.h"
#include "src/string/string_utils.h"
#include "src/__support/common.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(char *, stpcpy,
(char *__restrict dest, const char *__restrict src)) {
size_t size = internal::string_length(src) + 1;
__builtin_memcpy(dest, src, size);
char *result = dest + size;
if (result != nullptr)
return result - 1;
return nullptr;
}
} // namespace LIBC_NAMESPACE_DECL

Xet Storage Details

Size:
879 Bytes
·
Xet hash:
e22bbf210b251334b36891515b5e4562c3742da42e2c55f376448ab536049c65

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.