mtext_chr(3m17n)

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

✨ mtext_chr β€” the m17n Library's little "where u at bestie" function ✨

okay so like. you've got an M-text and you've got a character and you're sitting there like "where is she. where is my girl" β€” that's literally what this is for πŸ’… welcome to mtext_chr, part of the m17n Library (3m17n). she's small, she's simple, she slays.


🌸 NAME 🌸

mtext_chr β€” no cap, that's the whole name, she's just built like that πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int mtext_chr (MText * mt, int c)

two args, one int back, zero drama ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: this function returns the position of the first time a character shows up in an M-text. that's it, that's the vibe 🌈

mtext_chr() searches the M-text mt for character c. the search starts from the beginning of mt and goes toward the end. front to back, no backtracking, no side quests, just main character energy walking the timeline in order πŸ‘‘

like. if the character appears multiple times, you're getting the first one, periodt. she's not out here collecting all of them for you β€” she's giving you the earliest one and dipping. iykyk πŸ’œ


πŸ’– RETURN VALUE πŸ’–

  • if c is found, mtext_chr() returns its position ✨
  • otherwise it returns -1 πŸ’€ (yeah, she said "not here," and she meant it)

πŸ“ ERRORS πŸ“

  • MERROR_RANGE β€” when things go out of range, this is the error you get πŸ™ˆ

🌈 SEE ALSO 🌈

  • mtext_rchr() β€” the backwards-searching sister, she goes from the end πŸ”₯
  • mtext_character() β€” for when you wanna go the other direction entirely 🧚

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 the whole page bestie 🫢 that was Version 1.8.4, dated Mon Sep 25 2023, brought to you by mtext_chr(3m17n) β€” stay hydrated, read your manpages, and may every search return something other than -1 🌸✨

πŸ“¦ where this page comes from