Skip to content

Commit

Permalink
Update demo.odin
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Nov 28, 2016
1 parent 598dab5 commit 492490f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions code/demo.odin
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ main :: proc() {
offset = 0
for i := 0; i < count; i++ {
data, len := utf8.encode_rune(runes[i])
for j := 0; j < len; j++ {
backing[offset+j] = data[j]
}
copy(backing[offset:], data[:len])
offset += len
}

reverse := backing[:count] as string
fmt.println(reverse)
reverse := backing[:offset] as string
fmt.println(reverse) // olleH
}

0 comments on commit 492490f

Please sign in to comment.