Alasca: String and Text

Published on 2018-08-31.


Bare-bone representation of bytes + length, enforces UTF-8.

  • multiline-strings:
let string: String = """Dear Sir or Madam, 
	it's a pleasure to converse with you, 
	because ..."""
  • equivalent to "Dear Sir or Madam,\nit's a pleasure to converse with you,\nbecause ..."
  • the right amount of whitespace can be stripped out, because the amount of indentation is well-defined in the language syntax – no ‘preceding whitespace’-problem


Unicode-aware higher-level representation, includes locale/language information to implement things like lower-/upper-casing, “real” length correctly.

Text.en("hello") // english text"Hallo") // german text