category-group: strings

The string group is a large and important category, containing many classes and subroutines. The string group lives mostly in layers 0 to 4. A basic string class, string_o, is found in layer 1. Layer 2 has the text-string class, which is sub-classed from the string class. Text-strings have operations that can extract words from a string. "Parameter strings", also sub-classed from the string class, are in layer 3. This class specializes strings, providing a mechanism for managing name-value pairs.

The [basic] string class is a work horse for handling and processing many types of text. It is a foundation class for many other text-oriented classes. The string class has some simple search functions, including search-&-extract, and search-&-replace functions. these are similar to the regex_o (regular expression) class, but operate on exact matches of text only.

Closely related to the string class is the text-string class, or textstring_o (layer 2). This is a subclass of the string class, and you may want to use that more frequently, as you can extract (with a deletion option) a group of characters, such as a specific range, a word, or a line.

Beyond layer 2 are classes for name-value pairs, regular expressions, and "keywords". Both of these have their own little world, but fall under the string group nevertheless. Another group that technically might be categorized under strings is data bags, but this subject is so big and so important, that it breaks away from the string group and forms its own.

classes in this group: string_o (L01), regex_o (L02), textstring_o (L02),
                                      textbin_encode_o (L02), paramstring_o (L03), kw_parser_o (L04),
                                      namevalue_pair_o (L06), namevalue_set_o (L06)

support/internal classes: iregex_o, sun_regex_o, hs_regex_o, cat_parser_o, kw_error_handler_o,
                                            kw_schema_o, line_item_parser_o, text_item_parser_o,
                                            mword_item_parser_o, mline_item_parser_o, rblock_item_parser_o,
                                            mblock_item_parser_o, special_item_parser_ok, keyword_o (L04)

function groups: layer 00 functions group
                              layer 01 functions group
                              layer 02 functions group
                              layer 03 functions group


  • The layer-0 functions provide an assortment of functions that operate on type "char *". Many of these functions replicate and provide a wrapper around OS-supplied functions, eg, z_strcpy() does the same thing strcpy() does. The primary reason for the existance of such functions is to provide a standardized interface between your application and the OS. Usually, such functions have multiple OS-equivalent API functions, and even functions with the same name may behave slightly differently on different operating systems.
  • The string object (string_o) is the basic object for holding strings, that is, character arrays. This object does not support unicode, wide-byte, or complex cut-buffer font info. It is used for holding both human-readable text and binary data, such as segments of a .exe [executable] program. String objects automatically resize.
  • text-string objects (textstring_o) are string objects with some added functionality to process text, such as getting words or quoted text.
  • parameter-string objects (paramstring_o) handle name-value pairs embedded in a string. They can be passed into functions as an argument where loose (or no) typing is desired, a type of programming known as 'symbolic'.
  • name-value pair objects (namevalue_pair_o) are similar to parameter-string objects in that they handle name-value pairs, but the name and value are always maintained in individual string objects. An associated class, the name-value set object (namevalue_set_o) handles a set of name-value pair objects, and provides an easy interface for getting/adding/removing name value pairs from a set.
  • Regular expression objects (regex_o) provide a mechanism for searching strings via regular expressions. Since there seem to be a plethora of formats and standards for regular expressions, this object is built to accomodate such varying protocols. Currently 2 standards are supported.

The string class underwent an evolution, having at least 2 major overhauls. In the past, the 2 modes - "text" and "binary" had separate buffers. The resulting maintenance became too complex. Now, the data location has been merged into one.

String objects can store binary data. They automatically resize, as needed.

Does not support locales or multi-byte format, such as Unicode. Does not support multiple-font sections.