# 32 bit unicode character
a = 'a';
println(typeof(a));
println(sizeof(a));

# Char <--> int conversions
println(Int('a'));
println(Char(97));

# Character comparisons

println('A' <= 'a');
println('a' > 'b');
println('a' - 'd');
println('A' + 2);
println(2 + 'A');

# Strings

str = "hello world, this is a string\n";
println(typeof(str));

# Extracting characters via index from 1 to n
println(str[begin]);
println(str[1]);
println(str[5]);
println(str[end]);

# Get first and last indexes of string
println(firstindex(str));
println(lastindex(str));

# Length of string
println(length(str));

# length and lastindex might not always match
# - because some chars might take up 2 code units

# arithmetic indexing
str[1 + 4];

# range indexing with inclusive bounds
str[4:9];

# single indexing vs range indexing

str[1:1] # returns string
str[1] # returns character