Difference between revisions of "MC-Basic:LEFT$"
Line 52: | Line 52: | ||
|SEE ALSO= | |SEE ALSO= | ||
* [[MC-Basic:MID$|MID$]] | * [[MC-Basic:MID$|MID$]] | ||
− | * [[ | + | * [[MC-Basic:RIGHT$|RIGHT$]] |
[[Category:Axystems:MC-Basic:String_Manipulation|LEFT$]] | [[Category:Axystems:MC-Basic:String_Manipulation|LEFT$]] | ||
}} | }} |
Revision as of 08:40, 22 May 2014
The LEFT$ returns the specified number of characters from the left-hand side of the string.
In UTF-8 supporting versions 4.5.1 and higher NULL characters are no longer cut
out from strings, resulting in a different behavior:
Len of Chr$(0) is 1:
In former versions NULL characters could not appear in the middle of strings,
since theconcationation process cut these characters from the resulting string.
Syntax
LEFT$(<string>, <expression>)
Availability
All versions
Type
<return value>: String
<string>: String
<expression>: Long
Range
<return value>: String
<string>: String
<expression>: 0 to MaxLong
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
-->Test=”This string is to long”
-->PRINT LEFT$(Test,4)
This