mtext_case_compare(3m17n)
β¨ NAME β¨
mtext_case_compare β bestie, it compares two M-text regions and does NOT care about case π
πΈ SYNOPSIS πΈ
int mtext_case_compare (MText * mt1, int from1, int to1, MText * mt2,
int from2, int to2)
π DESCRIPTION π
okay so mtext_case_compare() is the vibe-check function: it compares two M-texts, mt1 and mt2, character-by-character, and it ignores cases the whole time. like, uppercase who? never heard of her π
the regions it actually compares are the stretch between from1 and to1 inside mt1, and the stretch between from2 and to2 inside mt2.
here's the rules of the region, no cap:
from1andfrom2are inclusive β they're in the squad π«Άto1andto2are exclusive β they're NOT included, sorry bestie- if
from1equalsto1(orfrom2equalsto2), that means you've got an M-text of length zero. iconic, but empty β¨ - and if you hand it an invalid region specification, it just treats it like both
from1andto1(orfrom2andto2) are0. that's the rule, periodt.
β RETURN VALUE β
it returns one of three little guys:
1β ifmt1is found greater thanmt20β if they're equal-1β ifmt1is found less thanmt2
and the comparison itself? it's based on character codes. that's the whole tea β
π¦ SEE ALSO π¦
your other faves, all in the same friend group:
mtext_cmp()mtext_ncmp()mtext_casecmp()mtext_ncasecmp()mtext_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>.
and that's a wrap, bestie π this was mtext_case_compare, straight outta the m17n Library, Version 1.8.4, dated Mon Sep 25 2023 β slay, ate, no crumbs, 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