Colobot Wiki
Advertisement

Extracts the first (that is, leftmost) characters from a string.

Syntax:

strleft ( string, len );

len: int

Number of characters to be extracted.

Examples:

	string s = strleft("abcdef", 2);  // s is "ab"
	string s = strleft("abc", 10);  // s is "abc"

See also[]

strlen, strright, strmid, strfind, strval, strupper,

Programming, types, and categories.

Advertisement