--- /dev/null
+//===-- Implementation of index -------------------------------------------===//
+//
+// 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/index.h"
+
+#include "src/__support/common.h"
+#include "src/string/string_utils.h"
+
+namespace __llvm_libc {
+
+LLVM_LIBC_FUNCTION(char *, index, (const char *src, int c)) {
+ return internal::strchr_implementation(src, c);
+}
+
+} // namespace __llvm_libc
--- /dev/null
+//===-- Implementation header for index -------------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_STRING_INDEX_H
+#define LLVM_LIBC_SRC_STRING_INDEX_H
+
+namespace __llvm_libc {
+
+char *index(const char *src, int c);
+
+} // namespace __llvm_libc
+
+#endif // LLVM_LIBC_SRC_STRING_INDEX_H
--- /dev/null
+//===-- Implementation of rindex ------------------------------------------===//
+//
+// 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/rindex.h"
+
+#include "src/__support/common.h"
+#include "src/string/string_utils.h"
+
+namespace __llvm_libc {
+
+LLVM_LIBC_FUNCTION(char *, rindex, (const char *src, int c)) {
+ return internal::strrchr_implementation(src, c);
+}
+
+} // namespace __llvm_libc
--- /dev/null
+//===-- Implementation header for rindex ------------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_STRING_RINDEX_H
+#define LLVM_LIBC_SRC_STRING_RINDEX_H
+
+namespace __llvm_libc {
+
+char *rindex(const char *src, int c);
+
+} // namespace __llvm_libc
+
+#endif // LLVM_LIBC_SRC_STRING_RINDEX_H
--- /dev/null
+//===-- Unittests for index -----------------------------------------------===//
+//
+// 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 "StrchrTest.h"
+
+#include "src/string/index.h"
+#include "test/UnitTest/Test.h"
+
+STRCHR_TEST(Index, __llvm_libc::index)
--- /dev/null
+//===-- Unittests for rindex ----------------------------------------------===//
+//
+// 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 "StrchrTest.h"
+
+#include "src/string/rindex.h"
+#include "test/UnitTest/Test.h"
+
+STRRCHR_TEST(Rindex, __llvm_libc::rindex)