page_util_quote(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– page_util_quote(n) β€” page character quoting utilities πŸ’–

okay bestie, so this one lives in the <pink>page</pink> section of the manual (it's page_util_quote(n), manual page number one, iconic) and it's literally just a lil' toolkit of character-quoting helpers. nothing scary, i promise. let's get into it 🫢


✨ SYNOPSIS ✨

package require page::util::quote ?0.2?

package require snit

::page::util::quote::unquote char

::page::util::quote::quote'tcl char

::page::util::quote::quote'tclstr char

::page::util::quote::quote'tclcom char

so yeah, you pull in the package (version ?0.2?, optional-ish), you also need snit, and then you've got four lil' commands to play with. that's the whole vibe check πŸ’…


🌸 DESCRIPTION 🌸

this package is giving utility commands and nothing else β€” it hands you a few commands that convert characters into various forms. that's it. that's the whole job. lowkey perfect, no cap. ✨


πŸŽ€ API πŸŽ€

okay here's the main character section, the four commands, one by one:

  • ::page::util::quote::unquote char β€” takes a character as it's stored in an abstract syntax tree by a PEG processor (peep the packages grammar::peg::interpreter, grammar::me, and their relations β€” iykyk), i.e. in some quoted form, and converts it into the equivalent Tcl character. the character comes back as the result of the command. so it's the un-quoting girlie πŸ’–
  • ::page::util::quote::quote'tcl char β€” takes a Tcl character (internal representation, fr fr) and converts it into a string that the Tcl parser will accept, that will regenerate the character in question, and that is 7bit ASCII. the string is returned as the result of this command. it's giving ✨safe and boring in the best way✨
  • ::page::util::quote::quote'tclstr char β€” takes a Tcl character (internal representation) and converts it into a string that the Tcl parser accepts and that generates a human readable representation of the character. the string comes back as the result of the command.
heads up bestie: this string does not use any unprintable characters. it may use backslash-quoting. high UTF characters get quoted to dodge problems with the still prevalent ascii terminals (we're all still living in ascii-land, unfortunately 😭). and it's assumed the string will be used in a double-quoted environment. note that. remember that. periodt. πŸ’…
  • ::page::util::quote::quote'tclcom char β€” takes a Tcl character (internal representation) and converts it into a string that the Tcl parser accepts when used within a Tcl comment. the string is returned as the result of this command. yes queen, comment-safe quoting, we love a niche specialty 🌈

πŸ’€ BUGS, IDEAS, FEEDBACK πŸ’€

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. like, no shade, it's just how it is. so please report them in the category page of the Tcllib Trackers:

http://core.tcl.tk/tcllib/reportlist

also please report any ideas for enhancements you may have for either the package and/or the documentation. we want the glow-up ✨

when proposing code changes, please provide unified diffs, i.e. the output of diff -u. don't be mysterious about it πŸ™ˆ

and note further that attachments are strongly preferred over inlined patches. attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. okay that's very specific but like, that's the instructions, so 🫢


πŸ”‘ KEYWORDS πŸ”‘

page, parser generator, quoting, text processing


πŸ‘‘ CATEGORY πŸ‘‘

Page Parser Generator


Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>


and that's the whole page bestie!! this beauty is tcllib version 1.0 and it ate, no crumbs left πŸ“πŸ’– mwah, go quote some characters, you got this βœ¨πŸ§šπŸ’œ

πŸ“¦ where this page comes from