StringLeft()
- Last UpdatedJul 13, 2023
- 1 minute read
Returns a specified number of characters in a string value, starting with the leftmost string character.
Category
String
Syntax
StringResult = StringLeft( Text, Chars );
Parameters
Text
Actual string or a string equipment.item.
Chars
Number of characters to return or an integer equipment.item.
Remarks
If Chars is set to 0, the entire string is returned.
Examples
StringLeft("The Control Pump is On", 3) ' returns "The";
StringLeft("Pump 01 is On", 4) ' returns "Pump";
StringLeft("Pump 01 is On", 96) ' returns "Pump 01 is On";
StringLeft("The Control Pump is On", 0) ' returns "The Control Pump is On";
See Also
StringASCII(), StringChar(), StringFromIntg(), StringFromReal(), StringFromTime(), StringInString(), StringLen(), StringLower(), StringMid(), StringReplace(), StringRight(), StringSpace(), StringTest(), StringToIntg(), StringToReal(), StringTrim(), StringUpper(), Text()