• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 546

27 Jul 2025 07:18AM UTC coverage: 90.104% (-0.02%) from 90.12%
546

push

github

bobzhang
align String::pad_start with JS semantics (not counting char length)

the rationale is that counting char_length is not enough, we need do more complex graphime.

Bottom Line
I'd follow JavaScript's semantics because:
It maintains consistency with your UTF-16-based API
It's predictable and performant
Most real padding use cases don't involve emojis
You can always add character-aware variants later if needed
The current design mixing UTF-16 offsets with character counting creates more confusion than the occasional visual incorrectness with emojis.

8 of 8 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

8531 of 9468 relevant lines covered (90.1%)

226093.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.55
/string/methods.mbt


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc