Slate Living Tutorial

to those about to rock...

Strings

Documentation on strings can be found here and here.

Strings are sequences of characters. A string can be literally defined by enclosing characters in single quotes: 'this is a string'. Special characters are backspaced: 'go to the next line\n'.

Iteration

Since strings are sequences, you can iterate over them:

'rock' do: 
[| :each |
    inform: (each as: String)].

Output:

r
o
c
k

Concatenation

'rock' ; ' ' ; 'out'.

Output:

'rock out'