mtext_pbrk(3m17n)
π mtext_pbrk β the m17n library's little "find any of these" bestie π
okay so this is a page from the m17n manual set β the m17n library one, 3m17n section, iykyk. Buckle up buttercup, it's short but it's iconic.
β¨ SYNOPSIS β¨
int mtext_pbrk (MText * mt, MText * accept)
that's it. that's the whole signature. two M-text pointers and an int coming back atcha π«Ά
πΈ DESCRIPTION πΈ
So what are we even doing here? We're searching an M-text for any of a set of characters. Like, any one of them, not a whole substring, not a phrase β just "does this character show up, and if so where" π
The mtext_pbrk() function locates the first occurrence in M-text mt1 of any of the characters in M-text mt2.
tiny heads-up bestie: the synopsis calls themmtandaccept, and the description calls themmt1andmt2. Same two args, different nicknames. The manual is just being β¨quirkyβ¨ like that. Keep both in mind so you don't get jump-scared π
Think of it like: mt1 is the text you're scrolling through, mt2 is your little set of characters you're lowkey stalking. First one of those characters that shows up in mt1? That's the moment. That's the vibe check. π¦
π₯ RETURN VALUE π₯
This function returns the position in mt1 of the found character. If no such character is found, it returns -1.
so basically:
- found something? you get the position π
- found nothing? you get
-1π and honestly? relatable
π 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>.
fr fr, respect the license bestie, it's giving legal and it's giving generous π«Ά
and that's the whole page!! Version 1.8.4, dated Mon Sep 25 2023 β so like, this page is a lil vintage but she still ate, no cap. mwah π go forth and pbrk, queen π
β¨πΈ
π¦ 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