String concatenation
====================
Could skip standard string concatenation (it doesn't work well with memory
allocation anyway), and use template strings and string builders for that
purpose.
String id = get_id void
String button_html = make_button_html void
StringBuilder sb = t"
"
sb.append message
sb.append "
Message length: {length message}"
sb.append_with_unchecked t"{button_html:raw}"
sb.append t"
"
return sb.to_html_string # <-- extension method
Pure string builder, with no escape handling:
StringBuilder sb = ""
return sb.to_raw_unchecked_string
# or
return sb.to_ascii_printable_string