mtext_tok(3m17n)
π mtext_tok β bestie edition π
okay so this is mtext_tok from the m17n Library (that's man page section 3m17n, iykyk), and honestly? it's giving tokenizer energy and I'm obsessed. sit down, grab a boba, we're doing this together π§β¨
β¨ SYNOPSIS β¨
MText* mtext_tok (MText * mt, MText * delim, int * pos)
πΈ DESCRIPTION πΈ
So the whole vibe here is: we're hunting for a token inside an M-text. The mtext_tok() function searches for a token that firstly occurs after position pos in the M-text mt.
And what even is a token, bestie? A token means a substring where each character does not appear in the M-text delim. Like, delim is the bouncer at the club and any character on the list is NOT getting in π
β οΈ real talk though β note that the type ofposis notintbut pointer toint. It's a pointer. Do not come for me, that's just what it is.int *, periodt.
π¦ RETURN VALUE π¦
- π If a token is found β
mtext_tok()copies the corresponding part ofmtand returns a pointer to the copy. In this case,posis set to the end of the found token. slay, we got one. - π If no token is found β it returns
NULLwithout changing the external variablemerror_code. nothing happened, no drama, no error, just vibes. - π If an error is detected β it returns
NULLand assigns an error code to the external variablemerror_code.
π₯ ERRORS π₯
MERROR_RANGE
π COPYRIGHT π
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, you ate it, I'm so proud π«Ά this was Version 1.8.4, dated Mon Sep 25 2023, and it lives in mtext_tok(3m17n). go forth and tokenize, main character πβπ
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms