mtext_cmp(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 β€” if mt1 is found greater than mt2 πŸ”₯
  • 0 β€” if they're equal 🫢 (bestie behaviour)
  • -1 β€” if mt1 is found less than mt2 😭

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 (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