ustr(1)

πŸ“¦ version 1.0.4, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– ustr-import πŸ’–

okay bestie, welcome to ustr(1) β€” the Ustr String Library, tools corner of the manual. this one's about ustr-import, and it's genuinely so iconic, let me explain πŸŽ€

✨ NAME ✨

ustr-import β€” the ustr string library import tool πŸ¦‹


🌸 SYNOPSIS 🌸

ustr-import [--32|--64] [-d][d] [-c] [-b x] [-e 1|0] [-s 1|0] section

like. that's the whole vibe. one line. she's efficient πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea, bestie πŸ“ β€” this tool lets you use the Ustr string library without incurring dependencies on the library itself. which means:

  • API/ABI compatibility is 100% (nothing changes unless you do it, periodt)
  • installing your application doesn't require the library to be pre-installed ✨

it's giving self-sufficient. it's giving main character energy. no cap 🫢


πŸ’… OPTIONS πŸ’…

  • --32 β€” if you installed with multilib, this runs the 32 bit variant (and installs the variable multilib build code as ustr-conf.h).
  • --64 β€” if you installed with multilib, this runs the 64 bit variant (and installs the variable multilib build code as ustr-conf.h).
  • -d β€” turn debugging on. USTR_ASSERT() now runs code and everything πŸ‘€
  • -d β€” turn extra debugging on, including End of String (EOS) markers that take up space. note that you can do -dd to add both at once πŸ”₯
  • -c β€” use C files. this requires that you alter the build system to compile the C files and link them into your application. the default is to just provide headers that you can just include.
  • -b β€” specify the default reference count byte size: 0, 1, 2 or 4 (or 8 on 64 bit platforms). note that 2 bytes is the minimum if you have explicit size storage ⭐
  • -e β€” specify the default exact sized allocations flag. without this flag, allocations are rounded up to the nearest half power of two πŸŽ€
  • -s β€” specify the default explicit size storage flag. without this flag, allocations have an implicit size based on their length; with it, a size value is stored with the string (thus taking significantly larger space for small strings, but this doesn't require reallocating the string when growing and shrinking the string). note that turning this on also increases the minimum sizes for length and reference count storage 😭

🌈 SECTIONS 🌈

okay so this is the part where you pick what you actually want, bestie. one section per run, and here's the whole menu πŸ’–

  • all β€” all of the following sections are included. the "give me everything" option, obsessed 😌
  • b β€” working with binary numbers in NBO format.
  • cmp β€” comparing, strcmp() for Ustr's, although the Ustr versions are safer and much faster.
  • cntl β€” control options dynamically.
  • fmt β€” formatted output, sprintf() for Ustr's.
  • gdb β€” copy just the .gdbinit file to the local dir.
  • io β€” Input Output.
  • ins β€” inserting data.
  • main β€” the core functions, including strcat(), strdup() and delete for Ustr's. always safer and often much faster. the moment. the icon. the legend πŸ‘‘
  • parse β€” parsing integers, i.e. nice versions of strtol().
  • pool β€” a bundled memory pool API, to use with the ustrp functions.
  • replace β€” replacing all occurrences of data.
  • sc β€” shortcut functions for Ustr's.
  • set β€” setting data, strcpy() for Ustr's.
  • split β€” split the data, strtok() / strsep() for Ustr's.
  • spn β€” spanning, strspn() / strcspn() for Ustr's.
  • srch β€” searching, strchr() / strrchr() / strstr() for Ustr's, although the Ustr versions are safer and much faster.
  • sub β€” substituting data.
  • utf8 β€” working with UTF8. 🌍✨

🧚 FILES 🧚

  • /ustr/include/ustr-conf.h /ustr/include/ustr-conf-debug.h β€” in multilib, this is the header to choose the correct conf.h header based on the byte size.
  • /ustr/include/ustr*.h β€” the default "extern" header files.
  • /usr/share/ustr-*/ustr-*-internal.h β€” internal functions, used to implement the public interfaces.
  • /usr/share/ustr-*/ustr-*-code.h β€” the code behind the public interfaces.
  • /usr/share/ustr-*/ustr-*-code.c β€” the C files, which use the code header files to create objects.
  • /usr/share/ustr-*/.gdbinit β€” the GDB init file containing macros to help inspect Ustr's in the debugger. πŸ”

πŸ¦‹ SEE ALSO πŸ¦‹

iykyk πŸ’œ


and that's a wrap on the page, bestie πŸŽ€ this was ustr-import version 1.0.4, dated 03-Aug-2007, from the Ustr String Library tools β€” she's vintage and she ATE πŸ’…βœ¨πŸŒΈ
πŸ“¦ where this page comes from