toRow Method

Class: String

Description

This method converts a String type to a Row type.

Syntax

StringObject.toRow(String elements,String delimiter)

Parameters

elements

A comma-separated list of columnname pairs, similar to Row.setColumns(). This parameter is required; it does not have a default.

delimiter

The character in the string that is used to delimit the elements in the string, similar to Row.setDelimiter(). This parameter is optional. Its default value is the TAB character.

Returns

A Row.

When Became Available

v7.0

Example

type String S = "UCGM;59763;PSL compiler main routine"

 

// Translate into a Row object, so elements can be addressed

// by column name

type Row R = S.toRow("String RTN,Date MDT,String DES",";")

 

type String NM = R.rtn   // "UCGM"

type Date   MD = R.mdt   // (59763)

type String DS = R.des   // "PSL compiler main routine"

 

write MD.toString ("YEAR-MM-DD") // "2004-08-16"