PAL CARD CATALOG ENTRY

SHORT DESCRIPTION

String maintenance with index retention


MOVEMENT WITHIN THE PAL CARD CATALOG
Move to top-level taxonomy
Move to keyword list

ASSET PROFILE

UNIT NAME
String_Utilities_Package
VERSION
1
REVIEW CODE
C1 1.0 A
INET ADDRESS
sun1.disacim.osd.mil (134.152.9.140)
AUTHOR
U.S. Army Information System Engineering Command
Ft. Belvoir, VA 22060-5456
RIGHTS
Approved for Public Release; Distribution Unlimited
COPYRIGHT
None -- Public Domain.
DATE CREATED
March 16, 1990
DATE RELEASED
January 17, 1994
DATE LAST UPDATED
January 17, 1994
LOCATION
DSRS Library
PAL
ENVIRONMENT
DEC MICROVAX II DECAda version 2.1 under VMS
ZENITH Z-248 PC ALSYS Ada under Microsoft DOS
LIMITATIONS
Not documented in PAL database
CERTIFICATION
Ada System Certifier_1 1.0
Date/Time of Processing: Wednesday 25 May       1994 02:32:25Pm
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               1
Library Units       2
Lines            1064
Statements        168
Comments          588

FILE LISTING

Directory Display


languages/ada/swcomps/dsrs/strutil2:
  File Name                 Size
  ---------                 ----
  strutil2.zip            25,708


Totals
  ==============  ==============
    1 Files               25,708

ABSTRACT

                            String_Utilities_Package
                                   01D001OV.1
                               (Old ID: RIA0012A)
PURPOSE/INTENDED USE:
String_Utilities_Package is an Ada package that provides operations for
parsing and maintaining strings and text. The subprograms in this
package provide the user with the capability to input an entire string
or just a segment of the string without losing the index position within
the original string. The largest string length this package can support
is system dependent, i.e., the largest positive integer supported by the
system. 

EXAMPLE APPLICATIONS:
Reuse of this asset is appropriate in systems requiring string
maintenance and parsing.   

CERTIFICATION LEVEL:
String_Utilities_Package is certified at Level 4.  This means that the
Defense  Information Systems Agency/Center for Information Management
Software Reuse  Program (SRP) management office has successfully
compiled the code of this  Reusable Software Asset (RSA) and measured
maintainability, portability,  reliability and reusability.  In
addition, this RSA includes a test suite and a  Reuser's Manual, which
will be provided when the asset is extracted. 
 
IMPLEMENTATION ISSUES:
Users must check for the global Default_Value after subprogram calls to
the string positional information subprograms and the String_Length
subprogram to determine the success or failure of the call. 

String lengths must be defined (constrained) by the user, with the
largest string length being set by the system at POSITIVE'Last.  Users
may not exceed this value. 

The user has control over the string range sent to each subprogram for
manipulation and this range remains constant within each subprogram. 
The only state changes within the scope of String_Utilities_Package is
that of the contents of the string or string segment itself.  The
subprograms within this package that may change the input string are
those that do case conversions and substitutions. 

String_Utilities_Package can be partially reused by deleting any
unneeded subprograms and recompiling the package.  Care must be taken to
include subprograms that are called by the desired subprograms.  For
example, the user could include only subprograms of case conversions in
the package. 

The operations provided by this package provide the user with the
capability to input an entire string or a slice of the string without
losing the index position within the original string. 

String_Utilities_Package defines no new or unusual types as parameters. 
A global variable (Default_Value) is defined in the package body and is
used by subprogram String_Length and all of the string positional
information subprograms within this package. Default_Value is assigned
as the return value when the string is empty or the position sought is
not found. 
                                                    
HARDWARE/ENVIRONMENT CONSTRAINTS AND LIMITATIONS:
This package was compiled in the following environments:

   DEC MICROVAX II    DECAda version 2.1 under VMS
   ZENITH Z-248 PC    ALSYS Ada under Microsoft DOS

SUBUNITS:
String_Utilities_Package has the following visible subprograms:
String Inquiries:
    Is_Empty_String        Determines if string is empty.
    Is_Alphabetic_String   Determines if string contains alphabetic
                           characters.
    Is_Numeric_String      Determines if string contains numeric characters.
    String_Length          Determines the length of string without leading
                           or trailing blanks.
    String_Equalities      Determines if two strings are equal, including
                           case equality if specified.
String Positional Information:
    Leading_Nonblank_Position    Determines first non-blank position in
                                 string.
    Trailing_Nonblank_Position   Determines last non-blank position in
                                 string.
    String_End_Position          Determines last character position after
                                 the first character or set of characters
                                 in string.
    Next_Blank_Position          Determines next blank position in a string.
    Character_Position           Determines position of a specified
                                 character in string, including case
                                 sensitivity if specified.
    Substring_Position           Determines position of a specified
                                 substring in string, including case
                                 sensitivity if specified.
 String Case Conversion:
    Change_Character_Case_Upper   Changes a character to upper case.
    Change_Character_Case_Lower   Changes a character to lower case.
    Change_String_Case_Upper      Changes a string to upper case.
    Change_String_case_Lower      Changes a string to lower case.
 String Substitution:
    Substitute_Character   Substitutes all occurrences of a specified old
                           character (including case sensitivity if
                           specified) with a given new character within a
                           string.
    Substitute_Substring   Substitutes all occurrences of a specified old 
                           substring (including case sensitivity if
                           specified) with a given new substring (of equal
                           length to old substring) within a string.
    Clear_String           Replaces all the characters in a string with
                           blanks.
    Fill_String            Truncates or fills a string with blanks in
                           order to make input string the size of the
                           desired output string.

DSRS CLASSIFICATION:
availability:  extractable
certification level:  level_4
component type:  implementation
data representation:  character
data representation:  string
environment:  mvii/vms/vaxada
environment:  zenith_pc/dos/alsys
function:  convert
function:  exchange
function:  parse
language:  ada
object:  character
object:  string
originator:  rapid
unit type:  package

LEGAL RESTRICTIONS:
This RSA contains public domain data with unlimited rights for all
users. Extraction is permitted to all authorized library users. 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. 

MISCELLANEOUS:
The standard for Level 4 certification has recently been upgraded. This
asset is currently undergoing modification to meet the new Level 4
requirements. 


REVISION HISTORY

January 17, 1994 Version 1 Original submission to PAL


RELEASE NOTICE

This prologue must be included in all copies of this software.
Restrictions on use or distribution:  NONE

LEGAL RESTRICTIONS:
This RSA contains public domain data with unlimited rights for all
users. Extraction is permitted to all authorized library users. 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.


DISCLAIMER

 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.