Register property versions of some methods.

This commit is contained in:
Stephen Chung
2020-05-30 10:30:21 +08:00
parent 666a618e40
commit 4c46c7e26b
15 changed files with 128 additions and 104 deletions

View File

@@ -11,7 +11,7 @@ print("foo" >= "bar"); // string comparison
print("the answer is " + 42); // string building using non-string types
let s = "hello, world!"; // string variable
print("length=" + s.len()); // should be 13
print("length=" + s.len); // should be 13
s[s.len()-1] = '?'; // change the string
print(s); // should print 'hello, world?'
s[s.len-1] = '?'; // change the string
print("Question: " + s); // should print 'Question: hello, world?'