libc/string.rs
1// Copyright 2026 The Fuchsia Authors
2//
3// Use of this source code is governed by a MIT-style
4// license that can be found in the LICENSE file or at
5// https://opensource.org/licenses/MIT
6
7use core::ffi::c_char;
8
9unsafe extern "C" {
10 /// Returns the length in bytes of the NUL-terminated string `s`.
11 ///
12 /// # Safety
13 ///
14 /// `s` must be non-null and point to a valid NUL-terminated C string.
15 pub fn strlen(s: *const c_char) -> usize;
16}