Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,35 @@
// create string
var s = "abc"
// destroy string (not really see notes above)
s = null
// (re)assignment
s = "def"
// comparison (only == && != supported directly)
var b = (s == "abc") // false
// cloning/copying
var t = s
// check if empty
s = ""
b = (s != "") // false
b = s.isEmpty // true
// append a byte
s = s + "b"
// extract a substring
s = "ghijkl"
t = s[1..4] // "hijk"
// replace a byte or string
s = "abracadabra"
s = s.replace("a", "z") // "zbrzczdzbrz"
// join strings
s = "abc"
t = "def"
var u = s + t // "abcdef"