Skip to content

Fix some string operations#895

Merged
Perryvw merged 7 commits intoTypeScriptToLua:masterfrom
ark120202:fix-string-methods
Jul 13, 2020
Merged

Fix some string operations#895
Perryvw merged 7 commits intoTypeScriptToLua:masterfrom
ark120202:fix-string-methods

Conversation

@ark120202
Copy link
Copy Markdown
Contributor

Fixes #890, fixes #814.

Changelog:

  • Fixed incorrect NaN and negative index handling of string charAt, charCodeAt, slice, substr, substring
  • Fixed String.prototype.substr evaluating length expression twice
  • Fixed indexing string out of bounds being an empty string instead of undefined

@Perryvw Perryvw merged commit 0d7c5cd into TypeScriptToLua:master Jul 13, 2020
@ark120202 ark120202 deleted the fix-string-methods branch July 13, 2020 18:11
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.

Indexing string out of bounds is an empty string instead of undefined string.slice negative end index is not shifted

2 participants