Previous Up Next

5.2.4  Extracting portions of a string

The left and right commands find the left and right parts of a string. (See Section 8.2.3, Section 6.5.1, Section 6.6.2, Section 6.3.6, Section 9.3.4, Section 9.3.5, Section 28.2.8 and Section 28.2.9 for other uses of left and right.)

The head command finds the first character of a string.

The mid command finds a selected part from the middle of a string.

The tail command removes the first character of a string.

Examples

left("hello",3)
     
“hel”           
right("hello",4)
     
“ello”           
head("Hello")
     
“H”           
mid("Hello",1,3)
     
“ell”           
tail("Hello")
     
“ello”           

Previous Up Next