Copies a substring of any length from a specific position in a string (text or code) to a new string.

NewString := COPYSTR(String, Position[, Length])

Parameters

String

Type: Text constant or code

The string that you want to copy from.

Position

Type: Integer

The position of the first character to copy. The value of Position must be greater than zero (0). If Position is greater than the length of the string, the system returns an empty string.

Length

Type: Integer

The number of characters to copy. Length must be greater than zero (0). If the value of Length results in Position + Length > (total length of the string), then the result includes all the characters from Position to the end of the string.

Expand imageProperty Value/Return Value

Expand imageRemarks

Expand imageExample

Expand imageSee Also