String Manipulation routines for abstract STRING_TYPE
Date/Time of Processing: Tuesday 24 May 1994 01:32:12Pm Overall Assessment of System: OK Classification of System: A Basis of Classification -- Syntax Errors PASS Completeness PASS Independence from External Libraries PASS Independence from a Specific Ada Compiler PASS Number of ... Files 7 Library Units 7 Lines 2341 Statements 548 Comments 989
languages/ada/asr/abstractions/string: File Name Size --------- ---- string.zip 8,381 languages/ada/asr/abstractions/stack: File Name Size --------- ---- stack.zip 2,446 languages/ada/asr/abstractions/slists: File Name Size --------- ---- slists.zip 189 languages/ada/asr/abstractions/lists: File Name Size --------- ---- lists.zip 7,485 Totals ============== ============== 4 Files 18,501
Package STRING_PKG exports an abstract data type, STRING_TYPE. The operations provided in this package fall into three categories: Constructors: Create: Convert predefined STRING type to STRING_TYPE & (three routines): String concatenation Substr: Extract a slice of type STRING_TYPE from an object of type STRING_TYPE Splice: Conditionally replace one substring with another Insert (three routines): Insert one string into another Lower (two routines): Replace all upper-case characters with lower-case characters or generate a new string with this replacement made Upper (two routines): Replace all lower-case characters with upper-case characters or generate a new string with this replacement made Heap Management: Make Presistent (two routines): Create a STRING_TYPE object that is not reclaimed when the heap is released (note: all strings created by the Constructors above are not persistent) Flush: Release the space used by a particular string Mark, Release: Mark marks the current state of the heap for use by Release; Release reclaims all non- persistent heap space Queries: Is Empty: Indicate if a STRING_TYPE is empty Length: Number of characters in a STRING_TYPE object Value: Duplicate a STRING_TYPE object Fetch: Return a particular character from a STRING_TYPE object Equal (three routines): Indicate if two strings are of the same length and contain the same characters "<" (three routines): Lexicographic comparison "<=" (three routines): Lexicographic comparison Match Character: Search a STRING_TYPE object for a particular character and return its index if found or 0 if not Match Not Character: Search a STRING_TYPE object for a character other than a particular character and return its index Match String (two routines): Locate a substring within a STRING_TYPE object Match Any (two routines): Locate a part of a substring within a STRING_TYPE object Match None (two routines): Locate first occurrance within a STRING_TYPE object which does not match a substring ABSTRACTIONS is used by NOSC/WIS tools 5.1.1, 5.1.2, 6.1.2, and 6.2. See also NEW_ABSTRACTIONS.
DATE VERSION AUTHOR HISTORY 03/85 1.0 Bill Toscano Initial Release
This prologue must be included in all copies of this software. This software is copyright by the author. This software is released to the Ada community. This software is released to the Public Domain (note: software released to the Public Domain is not subject to copyright protection). Restrictions on use or distribution: NONE
This software and its documentation are provided "AS IS" and without any expressed or implied warranties whatsoever. No warranties as to performance, merchantability, or fitness for a particular purpose exist. The user is advised to test the software thoroughly before relying on it. The user must assume the entire risk and liability of using this software. In no event shall any person or organization of people be held responsible for any direct, indirect, consequential or inconsequential damages or lost profits.