@LEFT

<< Click to Display Table of Contents >>

Navigation:  TCC > Variables & Functions > Functions >

@LEFT

@LEFT[n,string] : If n is positive, it returns the leftmost n characters of string. If n is greater than the length of string, it returns the entire string. If n is negative, it returns string after dropping its rightmost n characters, unless -n is greater than the length of string, in which case it returns an empty string.

 

Examples:

 

echo %@LEFT[2,jpsoft]

jp

 

echo %@LEFT[22,jpsoft]

jpsoft

 

echo %@LEFT[-2,jpsoft]

jpso

 

echo "%@LEFT[-22,jpsoft]"

""