Page 1 of 1

Right justify using string_trim in Modify stage

Posted: Fri Mar 10, 2006 4:30 pm
by crsimms
Hello all,

I have a situation where I want to within a Modify stage:

a. Suppress a leading edge character.
b. Right-justify the resulting string

Column meta-data is as follows:

input - ColY Varchar (64)
output - ColX Char (15)

Test input value - "ggggggreen"

Specification = ColX:string[15] = string_trim['g',begin,end](ColY)
Output - "......reen....." (A dot is used to represent an actual space)

Specification = ColX:string[15] = string_trim["g",begin,end](ColY)
Output - " ......reen....." (A dot is used to represent an actual space)


Test input value - "ggggggreenxxxxxxxxxxxxxxx"

Specification = ColX:string[15] = string_trim['g',begin,end](ColY)
Output - "....reenxxxxx" (A dot is used to represent an actual space)

The output suppresses the leading edge 'g's but does not right-justify. I have looked within the Orhestrate 7.0 Operators Reference and have not found any help as this function is undocumented.

Any help would be appreciated,

Posted: Mon Mar 13, 2006 3:50 pm
by roy
Hi,
How about using the

Code: Select all

string trim_leading_trailing
(string)
:?:

IHTH,