String Functions - trillium_discovery - Latest

Trillium Expression Builder

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Trillium > Trillium Quality
Version
Latest
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Expression Builder
Copyright
2024
First publish date
2008
Last updated
2024-10-18
Published on
2024-10-18T14:57:33.223822

 

The functions for the String category perform calculations on string values.

The STRSUB function (using the STRSUB table) has been deprecated. To convert a string, for example to convert a name to use proper case, use the five (5) casing tables listed in \tables\general_resources.

Note: The STRSUB table is still supported for legacy projects.

Function Name

Description

APPEND

Appends multiple values (such as strings, attributes, and integers) together with a space between each.

Note: Works the same as JOIN.
CONCAT

Concatenates two values (such as strings, attributes and integers) without a space. Equivalent to the string operator "II".

Note: If a value is an attribute, any trailing spaces in the attribute are maintained during the concatenation.
CONTAINS

Determines if an attribute contains a specified value, returning TRUE if value is in the attribute and FALSE if the value is not in the attribute.

HEXVAL

Converts a hexadecimal value to a character.

INSSTR

Inserts one string into another string at the specified offset.

ISALPHA

 

Determines which characters are considered alphabetic. The following characters are valid: a-z, A-Z. You can redefine the alphabetic character set by using a mask table. For example, add commas or spaces to the mask table if you want those characters to be considered alphabetic.

ISALPHANUM

Determines which characters are considered alphanumeric. The following characters are valid: a-z, A-Z, 0-9. Returns true (1) if the values are found to contain only numerics. You can redefine the alphanumeric character set by using a mask table. For example, add commas or spaces to the mask table if you want those characters to be considered alphanumeric.

ISNUMERIC

Determines which characters are considered numeric. The following characters are valid: 0-9. You can redefine the numeric character set by using a mask table. For example, add commas or spaces to the mask table if you want those characters to be considered numeric.

JOIN

Concatenates multiple values such as strings, attributes, and integers. Accepts two or more values.

Note: If a value is an attribute, any trailing spaces in the attribute are maintained during the concatenation.

The "||" is a simple join that concatenates two or more values without trimming any space.

The "|:" is a join with space that trims and the combines two or more values with a space in between.

LADJUST

Adjusts the contents of an attribute to the left. Leaves a single space between elements and includes any trailing blanks.

Note: This is designed as a temporary change to evaluate the IF statement and does not change the actual attribute data.
LCASE

Converts contents of an attribute to lowercase characters.

Note: Function does not trim trailing blank spaces during evaluation of the equals operator against a string literal. Consider using TRIM function in addition, to ensure there are no leading or trailing spaces that may affect expression results.
LENGTH

Returns the character length of an attribute.

Note: LENGTH returns the length in characters; SCHEMA_LENGTH returns the length in bytes.
LJUST

Left-justifies the contents of an attribute. Removes any leading blanks.

Note: This is designed as a temporary change to evaluate the IF statement and does not change the actual attribute data.
LOWER

Converts the values of an attribute to lowercase characters.

Note: Function does not trim trailing blank spaces during evaluation of the equals operator against a string literal. Consider using TRIM function in addition, to ensure there are no leading or trailing spaces that may affect expression results.
LPACK

Moves the contents of a value (such as an attribute) to the left. Removes all spaces between elements and includes any trailing blanks.

Note: This is designed as a temporary change to evaluate the IF statement and does not change the actual attribute data.
LTRIM

Trims the leading (left-side) white space from attribute values.

Note: This function will pad the ending with spaces to keep the original length of the field.
OCCSTR

Parses a string to find the location of a substring and returns a numeric value equivalent to the position of the substring occurrence counted from the left of the string. Returns null (-1) if the string is not found.

RADJUST

Adjusts attribute contents to the right. Leaves a single space between elements and includes any leading blanks.

Note: This is designed as a temporary change to evaluate the IF statement and does not change the actual attribute data.
REGEXP

Applies regular expressions to a string and returns the part of the string that matches the expression. If the string returns empty, there is no match.

Note: REGEXP is implemented using Perl Compatible Regular Expressions (PCRE).
REVERSE

Returns attribute values in the reverse order.

RIGHT

Returns characters from the right of a value based on a supplied number.

RJUST

Right-justifies the contents of an attribute. Removes any trailing blanks.

Note: This is designed as a temporary change to evaluate the IF statement and does not change the actual attribute data.
RPACK

Moves attribute contents to the right. Removes all spaces between elements and includes any leading blanks.

Note: This is designed as a temporary change to evaluate the IF statement and does not change the actual attribute data.
RTRIM

Trims the trailing (right-side) white space from an attribute.

Note: This function will pad the beginning with spaces to keep the original length of the field.
SPLIT

Splits a value relative to a separator character.

SUBSTITUTE

Finds and replaces characters in a string.

SUBSTR

Returns a substring which describes characters at the beginning, middle, or end of a string value. This function can also be used in an IF statement.

TCASE

Converts a string to title case (initial cap). When used with the optional argument ANY, converts the first alpha character and all characters immediately following a number to title case (initial cap).

Note: Function does not trim trailing blank spaces during evaluation of the equals operator against a string literal. Consider using TRIM function in addition, to ensure there are no leading or trailing spaces that may affect expression results.
TO_NUMBER

Converts multiple numeric values to a single numeric value.

TRIM

Removes leading and trailing white space characters (space, tab, new line, carriage return, and form feed) from the start and end of a value.

UCASE

Converts a value to uppercase.

Note: Function does not trim trailing blank spaces during evaluation of the equals operator against a string literal. Consider using TRIM function in addition, to ensure there are no leading or trailing spaces that may affect expression results.
UPPER

Converts a value to uppercase characters.

Note: Function does not trim trailing blank spaces during evaluation of the equals operator against a string literal. Consider using TRIM function in addition, to ensure there are no leading or trailing spaces that may affect expression results.