PIECE Function

解説

$PIECE( string, delimiter [ , first = 1 [, last ] ] )

Splits a delimited string into pieces.

パラメータ

String

(string) The string to partition

Delimiter

(string) The delimiter to use to split the string

First (optional)

(integer) The first piece of the string to return. The default value is 1.

Last (optional)

(integer) The last piece of the string to return. The default is first, meaning it will only return one piece.

GTM> SET FISH=”Catfish,Cod,Salmon,Tuna”

GTM> WRITE $PIECE(FISH,”,”)
Catfish

GTM> WRITE $PIECE(FISH,”,”,4)
Tuna

GTM> WRITE $PIECE(FISH,”,”,1,3)
Catfish,Cod,Salmon

GTM> SET $PIECE(FISH,”,”,1)=”Trout”
GTM> WRITE FISH
Trout,Cod,Salmon,Tuna

Table Of Contents

Previous topic

ORDER Function

Next topic

QUERY Function

This Page

inserted by FC2 system