<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


LEFT$ Search:

In Transient String Words in String Library

Word Name: LEFT$
Type: Standard word
Data Stack Signature: len -- / ss: s1 s2
Return Stack Signature: --
Availability: V1.2
Description:

From string s1, creates a new string, s2, consisting of len characters from the left side of string s1.

Example:

$" redgreenblue" 3 left$ .$ \ displays red

Comment:

An error occurs if:

  • The string stack is empty;
  • len is < or > the length of s1.
See Also: MID$  RIGHT$ 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>