Editing functions  Date/time functions

Chapter 3: Building Production Objects

Text manipulation functions

These functions manipulate the data content of the current blob area.

NoteIf the field filtered by these functions has a zero length, the filter function returns zero (0). Transaction production treats this return as a failure. To allow a zero length on the field, do one of the following:


squish()

Description

Removes white space (blanks) between a comma and any value that follows it. Use this filter function to shrink words into a single, unified whole.

Arguments

None.


ToLower()

Description

Converts alphabetic characters in the current blob area to lower case. Returns the number of characters filtered.

Arguments

None.


ToUpper()

Description

Converts alphabetic characters in the current blob area to upper case. Returns the number of characters filtered.

Arguments

None.


trim()

Description

Starts from the blob area’s right-most position and removes trailing spaces and/or form manipulation control characters until it finds a specific character, as identified by the argument, or finds another character. If it finds the character in the argument, it also removes that character from the blob area. Form manipulation control characters include FF, LF, CR, VT, HT, and TAB. The function then adjusts its internal data about the current blob area’s length to the new value.

Arguments

A character that delimits the trailing spaces deletion.


wordcap()

Description

Capitalizes the first letter of every word in the current data field. Words are data elements in the current data field that are delimited by spaces, tabs, or backspace characters.

Arguments

None.





Copyright © 2005. Sybase Inc. All rights reserved. Date/time functions

View this book as PDF