Previous Up Next

5.3.4 The left and right parts of a string: left right

The left and right commands can find the left and right parts of a string. (See Section ‍5.15.3, Section ‍5.37.1, Section ‍5.38.2, Section ‍5.40.6, Section ‍5.55.4 and Section ‍5.55.5 for other uses of left and right.)

Example.

Input:

left("hello",3)

Output:

"hel"


Example.

Input:

right("hello",4)

Output:

"ello"

Previous Up Next