Tutorial Toolkit Function Descriptions > Utilities > Strings
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Strings
 
string_newline_count
(chars, nl )
Description:
Count lines in string.
Input:
STRING
chars[]
String to count number of lines from.
Output:
INTEGER
nl
Number of new lines.
Error Conditions:
None.
Remarks:
None.
Example:
Please see string_newline_count (p. 1504) in the MSC Acumen Toolkit - Code Example.
 
string_newline_position
(chars, pos )
Description:
This function will return the position of any new line characters in a string.
Input:
STRING
chars[]
This value specifies the string which will have its new line characters counted.
Output:
INTEGER
pos( )
This value returns the positions of any new line characters in the string. This array should be allocated with at least the same number of offsets as there are characters in the input string chars. This array should be initialized to zero before this function is called.
Error Conditions:
None.
Remarks:
None.
Example:
Please see string_newline_position (p. 1505) in the MSC Acumen Toolkit - Code Example.
 
ga_entities_string_format
(entitytype, dblist, range, number, entitylist )
 
Description:
Converts an integer list of a given entity type to a character string.
Input:
INTEGER
entitytype
The Type Code from dbtypes.h.
INTEGER
dblist ( )
List of database labels.
INTEGER
range (3)
Range of member labels to return (1,2) and max size of conversion string (3).
INTEGER
number
Number of entity labels in database list.
Output:
STRING
entitylist[]
Formatted integer-to-character converted labelist.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
7000127-> Variable is not a virtual string.
8107002-> Last command aborted.
Remarks:
This is a utility routine called from GaGroupEntitiesGet() GaGroupVisEntitiesGet(), and GaGroupHidEntitiesGet() to convert an integer array returned from the database to a character string to be displayed in a listbox in the Group Members form. The “insequence” flag is to tell if the numbers being looked at are sequential e.g. 2,3,4,5. The return form is of the type “Grid 1:4 7 11 13:20 25”. This is now also called from PCL (uil_entity_class_get).
Example:
Please see ga_entities_string_format (p. 1427) in the MSC Acumen Toolkit - Code Example.
 
ga_entity_get_by_type
(entity_type, orphan, label_count, entity_labels )
Description:
This function will return all of the labels defined for entities of a specific type.
Input:
INTEGER
entity_type
This value specifies a type code. The type codes are listed in the dbtypes.h include file.
LOGICAL
orphan
This value specifies, when set to TRUE, that the count of all labels, including the orphan labels, will be returned. When this value is set to FALSE, the count of non-orphaned labels will be returned.
INTEGER
label_count
This value specifies the number of offsets defined for the output value entity_labels.
Output:
INTEGER
label_count
This value returns the number of labels specified by the input values entity_type and orphan.
INTEGER
entity_labels (label_count )
This value returns the list of entity labels specified by the input values entity_type and orphan.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
13000134-> The specified entity type was not found.
Example:
Please see ga_entity_get_by_type (p. 1428) in the MSC Acumen Toolkit - Code Example.
  
uil_list_union_expr
(operator, in_str1, in_str2, out_str)
Description:
This function updates two input strings returning a combined string.
Input:
STRING
operator[ ]
Operation flag.
“A” for adding two strings.
“R” for subtracting one string from another.
“C” for removing repeated strings.
STRING
in_str1[ ]
This string contains an expression to be modified by in_str2.
STRING
in_str2[ ]
This string contains an expression to use to operate on in_str1
Output:
STRING
out_str[ ]
This value returns the created ID list (string).
INTEGER
<Return_value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
1
Memory Error
List Processor Fetcher error
List Processor Error
2
3
Example:
Please see uil_list_union_expr (p. 1507) in the MSC Acumen Toolkit - Code Example.