String

String typed values are a string i.e. an array of unicode characters

Strings...

Initialization

String typed values can be constructed from a literal or templated string.

A templated string is a string which includes one or more value reference. At runtime, each reference gets evaluated and replaced with it's corresponding value.

Initialization Example (literal)

i'm a string

Initialization Example (templated)

# JSON representation of in scope object "someObject", replaces $(someObject) in the string
# contents of in scope file "someDir/file.txt" replaces $(someDir/file.txt) in the string
pre $(someObject) $(someDir/file.txt)

Coercion

String typed values are coercible to:

  • boolean (strings which are empty, all "0", or (case insensitive) "f" or "false" coerce to false; all else coerce to true)
  • file
  • number (if value of string is numeric)
  • object (if value of string is an object in JSON format)
Last updated on by Chris Dostert