fstrcasecmpi(3)
π NAME π
fstrcasecmpi β fuzzy comparison of two strings ignoring case
okay so bestie, real talk: this is the vibe-check function for strings. It's from the Library Functions Manual, it's fstrcasecmpi(3), and it's about to tell you how similar two strings are when you literally do not care about upper vs lower case. slay.
π SYNOPSIS π
#include <fstrcmp.h>
#define FSTRCMP_IDENTICAL
#define FSTRCMP_THRESHOLD
#define FSTRCMP_ERROR
int fstrcasecmpi(const char *string1, const char *string2);
yes, all four lines, no skipping, we're being thorough π
π¦ DESCRIPTION π¦
So the fstrcmp() function compares the two strings, string1 and string2, ignoring case.
That's it. That's the whole tea. π It looks at both strings, does NOT care about your caps lock situation, and gives you a fuzzy-similarity answer. Case? Not invited to this party. π
π RETURN VALUE π
It hands you back an int, and that int lives somewhere between 0 and FSTRCMPI_IDENTICAL. Let's break down the whole spectrum, because it's giving emotional range:
0β the strings are utterly un-alike. like, zero shared energy. not even a little. πFSTRCMPI_IDENTICALβ the strings are identical. twin flames. the same. periodt. π―ββοΈ- more than
FSTRCMPI_THRESHOLD(and that threshold sits between0andFSTRCMPI_IDENTICAL) β most people would consider these strings "similar". so like, basically the same thing with a little garnish. β¨ FSTRCMPI_ERRORβ always negative, and it means amalloc(3)failure went down. π the memory said no.
heads up, the constants in this section are spelled exactly like the page spells them βFSTRCMPI_IDENTICAL,FSTRCMPI_THRESHOLD,FSTRCMPI_ERROR. yes, with theI. iykyk. no cap, that's what's written. π«Ά
πΈ SEE ALSO πΈ
fstrcasecmp(3)β fuzzy comparison of two strings ignoring casefstrcmpi(3)β fuzzy comparison of two strings
go read those next bestie, they're the extended universe π§
π COPYRIGHT π
fstrcmp version 0.7 Copyright (C) 2009 Peter Miller Peter Miller <pmiller@opensource.org.au>
The comparison code is derived from the fuzzy comparison functions in GNU Gettext 0.17. The GNU Gettext comparison functions were, in turn, derived from GNU Diff 2.7.
Copyright (C) 1988-2009 Free Software Foundation
and that's the whole page, bestie π shoutout to fstrcmp version 0.7, to Peter Miller <pmiller@opensource.org.au>, and to the Free Software Foundation holding it down since 1988 all the way through 2009 β this manual page, fstrcasecmpi(3), said what it said and now you know it. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libfstrcmp-dev 0.7.D001-3 Β· LGPL-3.0-or-later
- debian trixie: libfstrcmp-dev 0.7.D001-5 Β· GPL-3.0-or-later
- fedora 43: fstrcmp-devel 0.7.D001-26.fc43 Β· GPL-3.0-or-later
- fedora 43: fstrcmp-devel 0.7.D001-26.fc43 Β· GPL-3.0-or-later
- fedora 44: fstrcmp-devel 0.7.D001-27.fc44 Β· GPL-3.0-or-later
- fedora 44: fstrcmp-devel 0.7.D001-27.fc44 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- ubuntu jammy: libfstrcmp-dev 0.7.D001-2 Β· LGPL-3.0-or-later
- ubuntu noble: libfstrcmp-dev 0.7.D001-3build1 Β· LGPL-3.0-or-later
- ubuntu questing: libfstrcmp-dev 0.7.D001-5
- ubuntu resolute: libfstrcmp-dev 0.7.D001-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: libfstrcmp-dev 0.7.D001-5build1 Β· GPL-3.0-or-later
- Copyright (C) 2009, 2011 Peter Miller
- Copyright (C) 2009 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms