Strings.module
-- Copyright (C) International Computer Science Institute, 1994. COPYRIGHT --
-- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
-- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in --
-- the file "Doc/License" of the Sather distribution. The license is also --
-- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA. --
--------> Please email comments to "sather-bugs@icsi.berkeley.edu". <----------
(*
STRING CLASSES
The central workhorse of string manipulation is STR. Sather
provides a literal syntax for STR:
"abc"
All STR objects are immutable, so they have a convenient value
semantics. They are stored as a contiguous character array with
a size field.
Sometimes it is much more efficient to operate on strings in
place. FSTR is a non-immutable string type, extended by amortised
doubling. It can do most of the things that STR can, but has the
uglier property that you need writebacks:
fstr := fstr + "abc";
Here, the 'fstr' returned may be the same as the 'fstr' on the right
side; in fact is usually will be. Novices are encouraged to use
STR if speed is not an issue.
STR_CURSOR provides a way of parsing strings into pieces in the
same way that scanf() allows in C.
GLOB is an attempt at a csh-like globbing facility. In the future
there will be other classes for generalized searching.
*)
-- This is a list of library files that can automatically
-- be loaded by a reference in users' SATHER_COMMANDS env variable
fstr.sa -has fstr.sa FSTR
glob.sa -has glob.sa GLOB
str.sa -has str.sa STR C_STR
str_cursor.sa -has str_cursor.sa STR_CURSOR
str_cursor_test.sa -has str_cursor_test.sa TEST_STR_CURSOR
fstr_test.sa -has fstr_test.sa TEST_FSTR
test_format.sa -has test_format.sa TEST_FMT
format.sa -has format.sa $FMT FMT FMT_ERROR_FLAGS FMT_ERROR
base_format.sa -has base_format.sa $FLT BASE_FORMAT FMT_NUMBERS