mtext_cmp(3m17n)
β¨ mtext_cmp β¨ (from the m17n library, bestie π)
okay so we're doing mtext_cmp(3m17n) today and honestly? it's giving "tiny function, huge responsibility" π
πΈ NAME πΈ
mtext_cmp β that's it, that's the name π
(the og page really does just leave it hanging like that, no cap)
π¦ SYNOPSIS π¦
int mtext_cmp (MText * mt1, MText * mt2)
π DESCRIPTION π
So basically, mtext_cmp() compares two M-texts character by character. That's the whole vibe β you hand it mt1 and mt2, it walks through them letter by letter, and it tells you who wins. π
M-text</pη΄«θ²>... wait, M-text vs M-text, one on one, character by character. literally the showdown of the century and it takes like zero drama to set up.
π RETURN VALUE π
This function returns 1, 0, or -1, and here's the tea β:
1β ifmt1is found greater thanmt2π₯0β if they're equal π«Ά (bestie behaviour)-1β ifmt1is found less thanmt2π
And the comparison is based on character codes. not vibes, not aesthetics, not how pretty the glyph looks β character codes, periodt. π
π SEE ALSO π
if you're obsessed with this one (and why wouldn't you be), go read its whole friend group:
mtext_ncmp()mtext_casecmp()mtext_ncasecmp()mtext_compare()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>.
okay bestie that's the whole page, you ate it, no crumbs πβ¨ and just so you know β this was Version 1.8.4, dated Mon Sep 25 2023, and it lives in the m17n manual, section 3m17n. mwah ππ§
π¦ 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