- Subject: Re: [slang-users] width of UTF-8 text in columbs
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Sun, 3 Feb 2013 21:04:39 -0500
Jaap Stolk <jwstolk@xxxxxxxxx> wrote:
> SLutf8_strlen() returns the number of Unicode characters.
> One or more of these Unicode characters could be rendered on the
> screen over 2 columns, for example many Chinese characters.
[...]
> I'm new to slang, so I may have overlooked a simpler solution.
> Has anyone encountered this situation before?
You can use the SLsmg_strwidth function. Also, the SLwchar_wcwidth
function returns the width of a specified wide character.
--John
[2013 date index]
[2013 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]