Scroll to navigation

ustr(1) Ustr String Library, tools ustr(1)

NAME

ustr-import - ustr string library import tool

SYNOPSIS

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

DESCRIPTION


This tool lets you use the Ustr string library without incuring dependancies on the library itself, so API/ABI compatability is 100% (nothing changes unless you do it) and installing your application doesn't require the library to be pre-installed.

OPTIONS

--32
If you installed with multilib, this runs the 32 bit varient (and installs the variable multilib build code as ustr-conf.h).

--64
If you installed with multilib, this runs the 64 bit varient (and installs the variable multilib build code as ustr-conf.h).

Turn debugging on, USTR_ASSERT() now runs code etc.

Turn extra debugging on, including End of String (EOS) markers that takeup space. Note that you can do -dd to add both at once.

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.

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.

Specify the default exact sized allocations flag, without this flag allocations are rounded up to the neared half power of two.

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

All of the following sections are included.

Working with binary numbers in NBO format.

Comparing, strcmp() for Ustr's, although the Ustr versions are safer and much faster.

Control options dynamically.

Formatted output, sprintf() for Ustr's.

Copy just the .gdbinit file to the local dir.

Input Output.

Inserting data.

The core functions, including strcat(), strdup() and delete for Ustr's. Always safer and often much faster.

Parsing integers, Ie. Nice versions of strtol().

A bundled memory pool API, to use with the ustrp functions.

Replacing all occurances of data.

Shortcut functions for Ustr's.

Setting data, strcpy() for Ustr's.

Slit the data, strtok() / strsep() for Ustr's.

Spanning, strspn() / strcspn() for Ustr's.

Searching, strchr() / strrchr() / strstr() for Ustr's, although the Ustr versions are safer and much faster.

Substituting data.

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 the 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

ustr(3),ustr_const(3)

03-Aug-2007 ustr-import 1.0.4