mplist_find_by_key(3m17n)

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

✨ mplist_find_by_key ✨

okay bestie, this is a page from the m17n Library manual (that's section 3m17n if you're keeping score), and it's literally the cutest lil property-list lookup you'll ever meet. sit down, hydrate, let's go 🫢


🌸 NAME 🌸

mplist_find_by_key β€” find a property by its key in a property list πŸ’…

(yeah the og page leaves the description blank, but the name says it all fr fr)


πŸŽ€ SYNOPSIS πŸŽ€

MPlist* mplist_find_by_key (MPlist * plist, MSymbol key)

πŸ¦‹ DESCRIPTION πŸ¦‹

so the whole vibe here is: you got a property list, you got a key, and you wanna find the property that matches. iconic.

The mplist_find_by_key() function searches property list plist from the very beginning πŸ‘‘ β€” like, start of the list, no skipping β€” looking for a property whose key is key. If such a property is found, a sublist of plist whose first element is the found one is returned. Otherwise? NULL. that's it, that's the whole thing, no cap 😭

and here's the lil plot twist that lowkey slaps:

If key is Mnil, it returns a sublist of plist whose first element is the last one of plist. πŸ“

so Mnil doesn't search for anything β€” it just hands you the tail end of the list, starting from the final element. main character behavior honestly ✨


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 β€” no SEE ALSO, no extra options, just this one lil function doing its one lil job and doing it well πŸ’œ

this has been Version 1.8.4, dated Mon Sep 25 2023, coming at you from the m17n Library gang β€” stay slay, stay hydrated, and may all your lookups return non-NULL πŸŒˆπŸ’–πŸŽ€

πŸ“¦ where this page comes from