Group Conversion (G)

Group Conversion (G)

Top  Previous  Next

 

The group conversion code treats the source data as being formed from a number of components separated by a delimiter character and extracts specified components. It works identically on input and output conversions.

 

GcnReturns the first n components of the source data delimited by character c.
GscnSkips s components and then returns the next n components of the source data delimited by character c.

 

 

Example

 

Consider a date stored in character form as 03/10/98. The G conversion code could be used to extract components of this date:

 

G/1returns 03
G/2returns 03/10
G1/1returns 10