STRCOLL(3)
๐ธ NAME
okay so bestie, this is STRCOLL(3) from the Library Functions Manual โ the page that literally says compare strings according to current collation. It's giving โsort it the way the locale says,โ and no cap, that's the whole assignment. Slay. ๐
๐ LIBRARY
Standard C Library (libc, -lc). Yes, that libc. ๐
โจ SYNOPSIS
#include <string.h>
int
strcoll(const char *s1, const char *s2);
int
strcoll_l(const char *s1, const char *s2, locale_t loc);
๐ DESCRIPTION
The strcoll() function lexicographically compares the null-terminated strings s1 and s2 according to the current locale collation, then returns an integer greater than, equal to, or less than 0 โ depending on whether s1 is greater than, equal to, or less than s2. It's a three-way vibe check: bigger, same, smaller. ๐ฅ
If information about the current locale collation is not available, the value of strcmp(s1, s2) is returned. Lowkey the fallback is just plain strcmp energy โ no collation info, no fancy sorting. ๐ซถ
And strcoll_l()? Same energy, but it uses an explicit locale argument rather than the system locale. The loc is literally right there in the signature, iykyk. ๐
๐ SEE ALSO
๐ STANDARDS
- The
strcoll()function conforms to ISO/IEC 9899:1990 (โISO C90โ). โญ - The
strcoll_l()function conforms to IEEE Std 1003.1-2008 (โPOSIX.1โ). ๐
Both ate, periodt. ๐
okay that's the whole page, bestie โ it comes from Debian, dated June 4, 1993, and STRCOLL(3) is signing off. ๐โจ
๐ฆ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1990, 1991, 1993 The Regents of the University of California. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms