! ******************************************************************************************************************************** ! Created: 30-AUG-2007 11:30:30 by OpenVMS SDL IA64-2 ! Source: 30-AUG-2007 11:30:30 GEM$:[GEMGROUP.SHEILAM.FORSYSDEF.IVMS-V83]STR$ROUTINES.SDI;1 ! ******************************************************************************************************************************** !*** MODULE str$routines *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN ! *************************************************************************** ! * ! COPYRIGHT (c) 1988, 1994, 1995 BY * ! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * ! ALL RIGHTS RESERVED. * ! * ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * ! OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * ! TRANSFERRED. * ! * ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * ! CORPORATION. * ! * ! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * ! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * ! * ! * ! *************************************************************************** ! STR$ADD ! ! Add Two Decimal Strings ! ! The Add Two Decimal Strings routine ! adds two decimal strings of digits. ! INTEGER*4 str$add EXTERNAL str$add ! STR$ANALYZE_SDESC ! ! Analyze String Descriptor ! ! The Analyze String Descriptor routine extracts the ! length and starting address of the data ! for a variety of string descriptor classes. ! INTEGER*2 str$analyze_sdesc EXTERNAL str$analyze_sdesc ! STR$ANALYZE_SDESC_64 ! ! Analyze String Descriptor (quadword output parameters) ! ! The Analyze String Descriptor routine extracts the ! length and starting address of the data ! for a variety of string descriptor classes. ! INTEGER*4 str$analyze_sdesc_64 EXTERNAL str$analyze_sdesc_64 ! STR$APPEND ! ! Append String ! ! The Append String routine appends a source string to the end of a ! destination string. The destination string must be a dynamic or ! varying-length string. ! INTEGER*4 str$append EXTERNAL str$append ! STR$CASE_BLIND_COMPARE ! ! Compare Strings Without Regard to Case ! ! The Compare Strings Without Regard to Case routine compares two input ! strings of any supported class and data type without regard to whether ! the alphabetic characters are uppercase or lowercase. ! INTEGER*4 str$case_blind_compare EXTERNAL str$case_blind_compare ! STR$COMPARE ! ! Compare Two Strings ! ! The Compare Two Strings routine compares the ! contents of two strings. ! INTEGER*4 str$compare EXTERNAL str$compare ! STR$COMPARE_EQL ! ! Compare Two Strings for Equality ! ! The Compare Two Strings for Equality routine, compares two ! strings to see if they have the same length and contents. ! Uppercase and lowercase characters are not considered equal. ! INTEGER*4 str$compare_eql EXTERNAL str$compare_eql ! STR$COMPARE_MULTI ! ! Compare Two Strings for Equality Using Multinational Character Set ! ! The Compare Two Strings for Equality Using Multinational Character ! Set routine compares two character strings for equality using the ! DEC Multinational character set. ! INTEGER*4 str$compare_multi EXTERNAL str$compare_multi ! STR$CONCAT ! ! Concatenate Two or More Strings ! ! The Concatenate Two or More Strings routine concatenates all specified ! source strings into a single destination string. ! INTEGER*4 str$concat EXTERNAL str$concat ! STR$COPY_DX ! ! Copy a Source String Passed by Descriptor to a Destination String ! ! The Copy a Source String Passed by Descriptor to ! a Destination String routine copies a source string to ! a destination string. Both strings are ! passed by descriptor. ! INTEGER*4 str$copy_dx EXTERNAL str$copy_dx ! STR$COPY_R ! ! Copy a Source String Passed by Reference to a Destination String ! ! The Copy a Source String Passed by Reference to a Destination String ! routine copies a source string passed by reference to a destination ! string. ! INTEGER*4 str$copy_r EXTERNAL str$copy_r ! STR$COPY_R_64 ! ! Copy a Source String Passed by Reference to a Destination String ! ! The Copy a Source String Passed by Reference to a Destination String ! routine copies a source string passed by reference to a destination ! string. ! INTEGER*4 str$copy_r_64 EXTERNAL str$copy_r_64 ! STR$DIVIDE ! ! Divide Two Decimal Strings ! ! The Divide Two Decimal Strings routine divides two decimal strings. ! INTEGER*4 str$divide EXTERNAL str$divide ! STR$DUPL_CHAR ! ! Duplicate Character Times ! ! The Duplicate Character empty Times routine generates a string ! containing n duplicates of the input character. If the destination ! string is an empty dynamic string descriptor, STR$DUPL_CHAR will ! allocate and initialize the string. ! INTEGER*4 str$dupl_char EXTERNAL str$dupl_char ! STR$ELEMENT ! ! Extract Delimited Element Substring ! ! The Extract Delimited Element Substring routine extracts an ! element from a string in which the elements are separated ! by a specified delimiter. ! INTEGER*4 str$element EXTERNAL str$element ! STR$FIND_FIRST_IN_SET ! ! Find First Character in a Set of Characters ! ! The Find First Character in a Set of Characters routine searches a ! string one character at a time, from left to right, comparing each ! character in the string to every character in a specified set of ! characters for which it is searching. ! INTEGER*4 str$find_first_in_set EXTERNAL str$find_first_in_set ! STR$FIND_FIRST_NOT_IN_SET ! ! Find First Character that Does Not Occur in Set ! ! The Find First Character that Does Not Occur in Set routine searches ! a string, comparing each character to the characters in a specified ! set of characters. The string is searched character by character, ! from left to right. STR$FIND_FIRST_NOT_IN_SET returns the position of ! the first character in the string that does not match any of the ! characters in the selected set of characters. ! INTEGER*4 str$find_first_not_in_set EXTERNAL str$find_first_not_in_set ! STR$FIND_FIRST_SUBSTRING ! ! Find First Substring in Input String ! ! The Find First Substring in Input String routine ! finds the first substring (in a provided list of ! substrings) occurring in a given string. ! INTEGER*4 str$find_first_substring EXTERNAL str$find_first_substring ! STR$FREE1_DX ! ! Free One Dynamic String ! ! The Free One Dynamic String routine deallocates one dynamic string. ! INTEGER*4 str$free1_dx EXTERNAL str$free1_dx ! STR$GET1_DX ! ! Allocate One Dynamic String ! ! The Allocate One Dynamic String routine allocates a specified number ! of bytes of dynamic virtual memory to a specified dynamic string ! descriptor. ! INTEGER*4 str$get1_dx EXTERNAL str$get1_dx ! STR$GET1_DX_64 ! ! Allocate One Dynamic String (quadword parameter) ! ! The Allocate One Dynamic String routine allocates a specified number ! of bytes of dynamic virtual memory to a specified dynamic string ! descriptor. ! INTEGER*4 str$get1_dx_64 EXTERNAL str$get1_dx_64 ! STR$LEFT ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring of a ! source string into a destination string. The relative starting ! position in the source string is 1. ! INTEGER*4 str$left EXTERNAL str$left ! STR$LEN_EXTR ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring of ! a source string into a destination string. ! INTEGER*4 str$len_extr EXTERNAL str$len_extr ! STR$MATCH_WILD ! ! Match Wildcard Specification ! ! The Match Wildcard Specification routine is used to compare a pattern ! string that includes wildcard characters with a candidate string. It ! returns a condition value of STR$_MATCH if the strings match and ! line_break STR$_NOMATCH if they do not match. ! INTEGER*4 str$match_wild EXTERNAL str$match_wild ! STR$MUL ! ! Multiply Two Decimal Strings ! ! The Multiply Two Decimal Strings routine multiplies two decimal strings. ! INTEGER*4 str$mul EXTERNAL str$mul ! STR$POSITION ! ! Return Relative Position of Substring ! ! The Return Relative Position of Substring routine searches for the ! first occurrence of a single substring within a source string. If ! STR$POSITION finds the substring, it returns the relative position ! of that substring. If the substring is not found, STR$POSITION ! returns a zero. ! INTEGER*4 str$position EXTERNAL str$position ! STR$POS_EXTR ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring of a ! source string into a destination string. ! INTEGER*4 str$pos_extr EXTERNAL str$pos_extr ! STR$PREFIX ! ! Prefix a String ! ! The Prefix a String routine inserts a source string at the ! beginning of a destination string. The destination string ! must be dynamic or varying length. ! INTEGER*4 str$prefix EXTERNAL str$prefix ! STR$RECIP ! ! Reciprocal of a Decimal String ! ! The Reciprocal of a Decimal String routine takes the reciprocal of the ! first decimal string to the precision limit specified by the second ! decimal string and returns the result as a decimal string. ! INTEGER*4 str$recip EXTERNAL str$recip ! STR$REPLACE ! ! Replace a Substring ! ! The Replace a Substring routine copies a source string to a ! destination string, replacing part of the string with another ! string. The substring to be replaced is specified by its starting ! and ending positions. ! INTEGER*4 str$replace EXTERNAL str$replace ! STR$RIGHT ! ! Extract a Substring of a String ! ! The Extract a Substring of a String routine copies a substring ! of a source string into a destination string. ! INTEGER*4 str$right EXTERNAL str$right ! STR$ROUND ! ! Round or Truncate a Decimal String ! ! The Round or Truncate a Decimal String routine rounds or truncates a ! decimal string to a specified number of significant digits and places ! the result in another decimal string. ! INTEGER*4 str$round EXTERNAL str$round ! STR$TRANSLATE ! ! Translate Matched Characters ! ! The Translate Matched Characters routine successively compares each ! character in a source string to all characters in a match string. ! If a source character has a match, the destination character is taken ! from the translate string. Otherwise, STR$TRANSLATE moves the source ! character to the destination string. ! INTEGER*4 str$translate EXTERNAL str$translate ! STR$TRIM ! ! Trim Trailing Blanks and Tabs ! ! The Trim Trailing Blanks and Tabs routine copies a source string ! to a destination string and deletes the trailing blank and tab ! characters. ! INTEGER*4 str$trim EXTERNAL str$trim ! STR$UPCASE ! ! Convert String to All Uppercase Characters ! ! The Convert String to All Uppercase Characters routine ! converts a source string to uppercase. ! INTEGER*4 str$upcase EXTERNAL str$upcase !DEC$ END OPTIONS