MLE-STRING(7)                    Macro Library                   MLE-STRING(7)

NAME
       mle-string - string support for mle

DESCRIPTION
       mle-string  is  a  library  for mle(1) which provides a string encoding
       macro that offers support for C-style escape sequences and  octal  byte
       literals.

INTEGRATION
       To  use the macro in an mle source file, include the library at the be‐
       ginning of your source:

       ! . string

MACROS
       The following macro accepts a sequence of  characters  which,  ideally,
       should be wrapped in double quotes.

       string VALUE
              Iterates  through VALUE, translating recognized escape sequences
              if encountered, and emits bytes to the output  stream.  The  en‐
              coder's OFFSET is advanced after each emission.

ESCAPE SEQUENCES
       The  string  macro  recognizes the following standard POSIX and C-style
       escape sequences:

       \a     Alert (Bell)

       \b     Backspace

       \c     Suppress output

       \f     Form Feed

       \n     Line Feed (Newline)

       \r     Carriage Return

       \t     Horizontal Tab

       \v     Vertical Tab

       \\     Literal Backslash

       \"     Literal Double Quote

       \'     Literal Single Quote

       \ord   Octal Byte Literal (range: 0 to 377)

INSTALLATION
       The library file string should be placed in the shared mle directory so
       it  can  be found by the encoder's import search path.  The best way to
       achieve this is to ensure mle-string setup shares the  same  PREFIX  as
       the local mle installation.

       Default Location
              /usr/local/share/mle/string

EXAMPLE
       UsageString:
            ! string "usage: disaster OPTIONS\n"
            ! string "\n"
            ! string "\033[1mOPTIONS\033[0m\n"
            ! string "\n"
            ! string "\t-v\t\tBe verbose\n"
            ! string "\t-c\t\tCount down to corruption\n"
            ! string "\n"
            ! define UsageStringLength $(dist UsageString)

SEE ALSO
       mle(1), mle-x86(7)

AUTHOR
       Justin Swartz <justin.swartz@risingedge.co.za>

COPYRIGHT
       Copyright (c) 2024-2026 Justin Swartz.

       This software is distributed under the 2-Clause BSD License.  Redistri‐
       bution and use in source and binary forms, with  or  without  modifica‐
       tion, are permitted provided that the license conditions are met.

MLE-STRING                         May 2026                      MLE-STRING(7)
