mtext_ncasecmp(3m17n)
π mtext_ncasecmp β from the m17n Library π
okay bestie, sit down, we're doing case-insensitive partial string comparison today and honestly? it's giving useful. this is a page from the m17n Library manuals, so you already know it's multilingual-coded. β¨
π NAME
mtext_ncasecmp β and yeah, that's it, the summary line is literally just the function name and a lonely little dash, no blurb, no teaser, nothing. the manpage authors said "the title is the description" and honestly, respect. π«Ά
β¨ SYNOPSIS
int mtext_ncasecmp (MText * mt1, MText * mt2, int n)
three things go in, one int comes out. iconic behavior. π
π DESCRIPTION
so what does it actually do? it compares the initial parts of two M-texts, and it does it while ignoring cases. uppercase, lowercase, who cares, we're not judging here. π
the way that mtext_ncasecmp() works is that it's super similar to mtext_casecmp(), bestie β same energy, same vibe β except it only compares at most n characters from the beginning. like, it doesn't read the whole thing, it reads the first little bit and then minds its own business. lowkey efficient. πΈ
π’ RETURN VALUE
the tea on what you get back: this function returns 1, 0, or -1. that's it, that's the whole menu.
1βmt1is found greater thanmt20βmt1is found equal tomt2-1βmt1is found less thanmt2
in that order, respectively, no cap. π
π SEE ALSO
go read these too, they're all in the same friend group:
mtext_cmp()mtext_casecmp()mtext_casecmp()mtext_compare()β yes bestie,mtext_casecmp()really does show up twice in the original list, and I am not about to erase her. she's booked and busy. πmtext_case_compare()
Β©οΈ COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
π legal besties, the license link is right there, please actually read it before you redistribute this page, I'm begging π
and that's the whole page, babes. Version 1.8.4, dated Mon Sep 25 2023, and yeah, that footer has been sitting there since 2023 being all mysterious. go forth and compare your M-texts case-insensitively, you absolute main character. πβ¨π¦
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms