---
name: "struid"
section: "3"
platform: "macos"
package: "ksh"
version: "42"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/struid"
---

# struid(3)

return user name given user number

## NAME

struid - return user name given user number

## SYNOPSIS

$1$2char\* struid(int uid)char\* struid(int uid)char\* struid(int uid)char\* struid(int uid)char\* struid(int uid)char\* struid(int uid)char\* struid(int uid)char\* struid(int uid)

## DESCRIPTION

*struid* returns the user id name string given the user number *uid*. *struid* maintains an internal cache to avoid repeated password database scans by the low level [*getpwuid*(3)](/getpwuid/3.md).

## SEE ALSO

[getpwent(3)](/getpwent/3.md)
