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


RIGHT$ Search:

In Transient String Words in String Library

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

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

Example:

$" redgreenblue" 4 right$ .$ \ displays blue

Comment:

An error occurs if:

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

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