Faster String#mb_chars. limit(bytes) cuts on a character boundary without walking the whole string and without raising on a broken byte. A 1 MB cut is about 2,000 times faster than the ActiveSupport grapheme scan, and a 7 MB cut is about 3,000 times faster. downcase, upcase, titleize, reverse, split, slice!, compose, decompose, tidy_bytes, and the other string methods are forwarded through method_missing. They still return mb_chars, so existing chains keep working.

Required Ruby Version

>= 2.7.0

Authors

SYNORYXEL

Versions

  1. 0.1.0
    1. source

      1. 0.1.0 source October 07, 2026 (12.5 KB)

Pushed by

SHA 256 checksum