mchartable_set_range(3m17n)

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

πŸ’– NAME πŸ’–

mchartable_set_range β€” bestie, this is the one that paints a whole range of characters with one value, in one go ✨


πŸŽ€ SYNOPSIS πŸŽ€

int mchartable_set_range (MCharTable * table, int from, int to, void * val)

🌸 DESCRIPTION 🌸

Okay so picture this: you've got a chartable, right? And you want a bunch of characters in it to all hold the same value. Not one at a time like some kind of villain β€” a whole stretch of them, together, at once. That's literally this function. Main character energy fr fr πŸ’…

The mchartable_set_range() function assigns the value val to the characters from from to to (both inclusive, bestie β€” don't forget the endpoints, they're invited to the party too 🫢) in the chartable table.

So yeah, it's giving "fill in this range, slay, done". No cap.


✨ RETURN VALUE ✨

  • If the operation was successful, mchartable_set_range() returns 0. Iconic. We love a zero. πŸ‘‘
  • Otherwise it returns -1 and assigns an error code to the external variable merror_code. So check that variable, okay? It's the one holding the receipts. 🧾
  • Special lil case: if from is greater than to, mchartable_set_range() returns immediately without an error. Like, it just leaves. No drama, no error code, nothing. Not me thinking that's lowkey the funniest possible behaviour 😭

πŸ’€ ERRORS πŸ’€

  • MERROR_CHAR

🌈 SEE ALSO 🌈

  • mchartable_set()

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 that πŸ“βœ¨ This was Version 1.8.4, dated Mon Sep 25 2023, and it lives in the m17n library. Go forth and set some ranges, you gorgeous nerd πŸ¦‹πŸ’–

πŸ“¦ where this page comes from