Skip to content

Conversation

@Aeledfyr
Copy link
Collaborator

Implement string.format. This is very messy in its current state and needs work to clean up the sequence part, but it works, and supports calling back to lua tostring metamethods.

- Almost entirely compatible with PRLua under the C locale
- Minor differences in the handling of '%q';
   - Invalid UTF8 is escaped rather than passed through
   - math.mininteger is represented as `(-9223372036854775807-1)`
     rather than `0x8000000000000000` due to parsing differences
     in Piccolo.
- Supports a few extra specifiers:
   - %b and %B for binary integers (C23)
   - %F for uppercase floats
   - %C for encoding a unicode codepoint as utf8
   - %S for utf8-aware strings
@Aeledfyr Aeledfyr marked this pull request as ready for review May 6, 2025 03:26
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.

1 participant