mtext_copy(3m17n)

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

✨ mtext_copy ✨

okay bestie, welcome to the m17n Library manual page for mtext_copy β€” yes you're in 3m17n, the section for library calls, and yes this is gonna be fun πŸ’–


🌸 NAME 🌸

mtext_copy β€”

no fr, that's it. the NAME section literally just says mtext_copy - and then stops. the blank after the dash is doing a lot of heavy lifting. iconic of it honestly πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

MText* mtext_copy (MText * mt1, int pos, MText * mt2, int from, int to)

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole vibe here is: copy characters in the specified range into an M-text. That's the mission. 🫢

The mtext_copy() function copies the text between from (inclusive, so it's in the club) and to (exclusive, so it's NOT) in M-text mt2 over to the region starting at pos in M-text mt1 β€” and it does all of this while inheriting the text properties. yes queen, properties come along for the ride, no cap.

Important things to know, bestie:

  • The old text in mt1 gets overwritten. gone. replaced. it's giving glow-up, not merge. 😭
  • The length of mt1 is extended if necessary β€” so it'll stretch to fit, it's flexible like that.
  • mt2 is not modified. she's just standing there, unbothered, watching. untouched, unbothered, in her lane. πŸ‘‘

πŸ’… RETURN VALUE πŸ’…

If the operation was successful, mtext_copy() returns a pointer to the modified mt1. slay, she returns herself (well, a pointer to herself) πŸ”₯

Otherwise, it returns NULL and assigns an error code to the external variable merror_code. so yeah, check your errors, don't be that girl πŸ™ˆ


🚨 ERRORS 🚨

  • MERROR_RANGE

⭐ SEE ALSO ⭐

  • mtext_cpy()
  • mtext_ncpy()

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 that's the whole page, bestie, you ate it up πŸ“βœ¨

Version 1.8.4 β€” dated Mon Sep 25 2023, and that's the mtext_copy(3m17n) energy. mwah, bye πŸ’–πŸ§šπŸŒˆ

πŸ“¦ where this page comes from