Re: [elixir-core:11192] Re: Proposal: Introduce string limit function.

2022-11-20 Thread José Valim
Good shout on using String.split_at/2 on the implementation, Zach. It is one of the concerns I raised in the original PR and your solution is quite elegant. Which also brings another point: if the implementation is 6 LOC (I believe the first two clauses are not strictly necessary), then there is

Re: [elixir-core:11192] Re: Proposal: Introduce string limit function.

2022-11-19 Thread Kip
> for rendering strings in UIs This is the bit that concerns me about user expectations. Rendering to a specific length can really only be done by the render engine since characters, kerning and spacing are variable width. The widest I know of is the single grapheme "﷽". And that also doesn't