[libc-commits] [libc] [libc]: Implement strfrom* functions and utils (PR #85438)

Vinayak Dev via libc-commits libc-commits at lists.llvm.org
Sat Mar 16 02:04:44 PDT 2024


================
@@ -0,0 +1,44 @@
+//===-- Implementation of strfromf ------------------------------*- C++ -*-===//
+//
+// 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/stdlib/strfromf.h"
+#include "src/stdlib/str_from_util.h"
+
+#include <stdarg.h>
+#include <stddef.h>
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(int, strfromf,
+                   (char *__restrict s, size_t n, const char *__restrict format,
+                    float fp)) {
+
+  if (!s)
----------------
vinayakdsci wrote:

OK! Done.

https://github.com/llvm/llvm-project/pull/85438


More information about the libc-commits mailing list