RE: Re: [lang] StringUtils.abbreviate is not emoji aware, breaks surrogate pairs

2025-04-14 Thread Carsten Kirschner
e a unit test with the expected behavior? The example > you gave has console output and assertions commented out, both of > which are undesirable. Instead of me guessing, I'd rather you manage > expectations and provide a failing/passing set of assertions. > > TY! >

[lang] StringUtils.abbreviate is not emoji aware, breaks surrogate pairs

2025-04-11 Thread Carsten Kirschner
Hello, The current commons lang3 StringUtils.abbreviate (3.17.0) implementation will destroy 4 byte emoji characters and larger grapheme clusters. I know that handling grapheme correctly before java 20 is not possible, but at least a codepoint aware solution with String.offsetByCodPoints could