Character Text Chunk

Syntax: char[acter] <integer1> [to <integer2>] {of | in} <expression> the <ordinal> char[acter] {of | in} <expression>


The character chunk yields a substring of an expression by extracting a specified character or range of characters from the expression. The expression can be any valid text string, including a container reference, a property reference, a function that returns text, a literal string, or a combination of these.


You can specify chunks of chunks, as in the following example: char 1 of word 1 of the short name of button 4 You can also specify ranges of chunks, as in the following example: char 5 to 20 of field "LAST NAME" You can use text chunk expressions with tabular chunk expressions by enclosing the tabular chunk expression in parentheses, as in the following example: put char 1 to 5 of (col 2 of pickList 3) Attention: You can use a combination of text and tabular chunk expressions to retrieve values, but not to insert values into containers. Oracle Media Objects evaluates the following expressions as shown below: Expression: char 1 of "hello" Result: h Expression: char 2 to 3 in "goodbye" Result: oo Expression: character 2 of character 2 to 3 of "hello" Result: l Expression: char 1 to 3 of word 4 of "How are you today?" Result: tod Expression: char 1 to 5 of my_variable Result: Oracl Expression: the last character in card field 1 Result: 6 Expression: char 1 of the name of cd fld 1 Result:
c _______________________________________ Examples:
The following examples demonstrate various chunk expressions and the values they return. For the examples, assume these conditions: put "Oracle Media Objects" into my_variable
This text has been mechanically extracted from the Oracle Media Objects MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.