m17nChartable(3m17n)

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

πŸ’– m17nChartable β€” bestie, let's talk chartables πŸ’–

okay so this is a page from The m17n Library, manual section 3m17n, and it's all about MCharTable β€” the iconic little data structure that holds attributes for a truly unhinged number of characters. no cap. let's get into it 🫢


✨ NAME ✨

m17nChartable_-_Chart β€” Chartable objects and the API for them. that's the vibe. πŸ’…


🌸 SYNOPSIS 🌸

πŸŽ€ Typedefs

  • typedef struct MCharTable MCharTable β€” the type of chartables. yep, that's the whole typedef, it's giving minimalism ✨

πŸ¦‹ Functions

MCharTable * mchartable (MSymbol key, void *default_value)

Create a new chartable. baby's first chartable 🍼

int mchartable_min_char (MCharTable *table)

Return the minimum character whose value is set in a chartabe. (yes the original says "chartabe", we love a typo, we keep it fr fr πŸ’€)

int mchartable_max_char (MCharTable *table)

Return the maximum character whose value is set in a chartabe. πŸ’–

void * mchartable_lookup (MCharTable *table, int c)

Return the assigned value of a character in a chartable. πŸ”

int mchartable_set (MCharTable *table, int c, void *val)

Assign a value to a character in a chartable. ✍️

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

Assign a value to the characters in the specified range. a whole range, she's efficient πŸ‘‘

void mchartable_range (MCharTable *table, int *from, int *to)

Search for characters that have non-default value. 🌈

int mchartable_map (MCharTable *table, void *ignore, void(*func)(int, int, void *, void *), void *func_arg)

Call a function for characters in a chartable. very main character energy πŸ”₯

πŸ’œ Variables

  • MSymbol Mchar_table β€” the symbol, bestie, the symbol ⭐

🌟 Detailed Description 🌟

Chartable objects and API for them. periodt.

Symbol whose name is 'char-table'.

so here's the tea: The m17n library supports enormous number of characters. like, so many. Thus, if attributes of each character are to be stored in a simple array, such an array would be impractically big. 😭 a whole array? for all of them? absolutely not.

The attributes usually used, however, are often assigned only to a range of characters. Even when all characters have attributes, characters of consecutive character code tend to have the same attribute values. it's giving patterns, it's giving structure, we love to see it πŸ’…

The m17n library utilizes this tendency to store characters and their attribute values efficiently in an object called Chartable. Although a chartable object is not a simple array, application programs can handle a chartable as if it is an array. ✨ the way that it's a whole nother data structure but you can pretend, iconic.

Attribute values of a character can be obtained by accessing a Chartable for the attribute with the character code of the specified character.

A chartable is a managed object. 🫢

The symbol Mchar_table has the name 'char-table'.


🧚 Typedef Documentation 🧚

πŸ’– typedef struct MCharTable MCharTable

Type of chartables. <>

The type MCharTable is for a chartable objects. Its internal structure is concealed from application programs. πŸ™ˆ like, mind your business, she's mysterious, she's private, you get the API and that's it.


πŸ“ Variable Documentation πŸ“

⭐ MSymbol Mchar_table

(she's a variable. she's Mchar_table. that's the whole entry. short queen πŸ‘‘)


🌈 Author 🌈

Generated automatically by Doxygen for The m17n Library from the source code. so technically a robot wrote it, but the robot ate. πŸ€–βœ¨


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 bestie real talk: this doc is under the GNU Free Documentation License, so copy/distribute/modify is allowed under those terms β€” that's not a vibe, that's a legal thing, respect it πŸ’…

and that's the page!! πŸ’– this was Version 1.8.4, dated Mon Sep 25 2023, and it's the m17nChartable(3m17n) page from The m17n Library. slay, go store some character attributes efficiently, you got this πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from