#.require. clr namespace Test class Test def main is shared s as String = '' assert not s.length s = 'aoeu' assert 'aoeu'.length assert s.length==4 assert 'aoeu'=='aoeu' assert s=='aoeu' assert s<>'asdf' assert s.equals('aoeu') assert s.getHashCode<>0 s = "aoeu" # double quotes assert 'aoeu'.length==4 assert '\a'.length==1 assert '\b'.length==1 assert '\f'.length==1 assert '\n'.length==1 assert '\r'.length==1 assert '\t'.length==1 assert '\v'.length==1 assert '\''.length==1 assert '\"'.length==1 assert '\\'.length==1 assert '\?'.length==1 assert '\0'.length==1 assert '\\t'.length==2 assert '\\t'[1]=='t' # concat assert 'a' + 'b' == 'ab' assert 'a' + '' == 'a' assert 'a' + 'b' + 'c' == 'abc' # try some methods assert 'abc'.indexOf('b')==1 assert 'abc'.indexOf('d')==-1 assert 'abc'.endsWith('c') # comparisons to chars assert 'x'==c'x' assert c'x'=='x' assert '\0'==c'\0' # += s = 'x' s += 'y' assert s=='xy' # concat with toString s = 'aoeu' s = s[0].toString + 'b' assert s=='ab' # chars assert 'a'[0] == c'a' assert '"'[0] == c'"' assert "'"[0] == c"'" # backslashes assert 'cobra\'s lair' == "cobra's lair" assert '"' == "\"" assert '\'' == "'" assert '\''[0] == c"'" assert "\""[0] == c'"'