Added the []= overloadable operator and implemented it for vector, map, and string

This commit is contained in:
Nathan Braswell
2015-06-27 11:46:31 -04:00
parent b18c18ec30
commit dacfee6d22
13 changed files with 71 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ obj string (Object) {
var new.construct(data.slice(first,second)): string
return new
}
fun operator[]=(index: int, toSet: char) {
data[index] = toSet
}
fun set(index: int, toSet: char) {
data.set(index, toSet)
}
fun length():int { return data.size; }
fun operator=(str: char*): void {