mtext_text(3m17n)

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

✨ mtext_text ✨

okay bestie, welcome to the m17n Library corner of the manual β€” this is mtext_text(3m17n), and it's genuinely one of the most useful little functions here, no cap. let's get into it πŸ’–


🌸 NAME 🌸

mtext_text β€” find one M-text inside another one, fr fr


πŸ¦‹ SYNOPSIS πŸ¦‹

int mtext_text (MText * mt1, int pos, MText * mt2)

like. three things in, one int out. iconic behaviour honestly πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so the whole vibe of this function is: locate an M-text in another. that's it, that's the job. πŸŽ€

mtext_text() finds the first occurrence of the M-text mt2 inside the M-text mt1, and it only starts looking after the position pos. and here's the cute part β€” it does all of this while ignoring difference of the text properties. so the properties aren't part of the vibe check, only the actual text is. periodt. ✨


🫢 RETURN VALUE 🫢

  • if mt2 is found in mt1, mtext_text() returns the position of it first occurrence πŸŽ‰
  • otherwise it returns -1 πŸ’€ (she said no)
  • and if mt2 is empty, it returns 0 🌈

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


ok that's the whole page bestie, you ate that πŸ“ go find your substrings, you got this πŸ’œ

and for the lil sign-off moment: this was Version 1.8.4, dated Mon Sep 25 2023, straight from mtext_text(3m17n). mwah πŸ’‹πŸ§š

πŸ“¦ where this page comes from