Returns a number of characters from the left-hand side of a string.
StringLeft ( "string", count )
string | The string to evaluate. |
count | The number of characters to get. |
If count exceeds string length, the entire string is returned.
If count is negative, an empty string is returned.
StringCompare, StringInStr, StringLen, StringLower, StringMid, StringReplace, StringRight, StringSplit, StringTrimLeft, StringTrimRight, StringUpper
#include <MsgBoxConstants.au3>
Local $sString = StringLeft("This is a sentence with whitespace.", 5) ; Retrieve 5 characters from the left of the string.
MsgBox($MB_SYSTEMMODAL, "", "The 5 leftmost characters are: " & $sString)