Skip to content

Preserve bytes when indexing strings - #210

Open
ctoth wants to merge 1 commit into
masterfrom
agent/issue-67-string-index-bytes
Open

Preserve bytes when indexing strings#210
ctoth wants to merge 1 commit into
masterfrom
agent/issue-67-string-index-bytes

Conversation

@ctoth

@ctoth ctoth commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • return a one-byte substring when indexing strings instead of rune-expanding high bytes
  • cover every byte of a non-ASCII string and byte-exact reassembly

Testing

  • go test ./vm
  • go test ./...

Closes #67

@ctoth
ctoth force-pushed the agent/issue-67-string-index-bytes branch from b95bd3d to c678dd7 Compare August 12, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vm: string index s[i] returns 2 bytes for a non-ASCII byte; Toast's substr returns 1

2 participants