mtext_search(3m17n)
π NAME π
mtext_search β okay so the official description here is literally just a dash, no cap, the manpage said "mtext_search -" and dipped. We move anyway. This is the M-text search function from the m17n Library, and she is that girl. π
β¨ SYNOPSIS β¨
int mtext_search (MText * mt1, int from, int to, MText * mt2)
Four args, one int, zero drama. π
π¦ DESCRIPTION π¦
Bestie, listen. mtext_search() locates an M-text inside a specific range of another M-text. It's a find-in-range, but make it M-text. β¨
So what happens is: it searches for the first occurrence of the M-text mt2 inside the M-text mt1, but only in the region between from and to β and it does all of that while ignoring difference of the text properties. Yes, the properties are getting ignored. She said "I'm not looking at your properties today." π
And here's the direction tea π:
- If
fromis less thanto, the forward search starts fromfrom. - Otherwise, the backward search starts from
to.
So the range tells you where to look, and the ordering offromandtotells you which way to walk. Main character direction energy. π§
π RETURN VALUE π
- If
mt2is found inmt1,mtext_search()returns the position of the first occurrence. β¨ - Otherwise it returns
-1. Not found, not slaying, not today. π - If
mt2is empty, it returns0. Empty queen returns zero, iconic behavior honestly. π
π 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 and that's the whole page, bestie!! πΈ This was Version 1.8.4, dated Mon Sep 25 2023, and it's the mtext_search(3m17n) girl herself. Go find your substrings, periodt. πβ¨π¦π
π¦ 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