jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: slang: UTF-8 and strlen


On Mon, May 12, 2003 at 10:19:36AM -0400, John E. Davis wrote:
> Günter Milde <milde@xxxxxxxxxxxxxxxxxxxx> wrote:
> >Sometimes, you want to switch the behaviour at runtime, based on some value
> >and 
> > len = strlen(str, foo)
> >is simpler than
> > if (foo)
> >   len = strlen(str)
> > else
> >   len = strcharlen(str)
> 
> I have a hard time imaging a common situation where you would want to
> do this.  Do you have a specific example in mind?

I hope the time wasn't too hard... Actually I do not know enough about UTF-8
to come up with an example, it is more the general feeling.
(search_forward/backward is an example where search(dir=1) would facilitate
the implementation of a repeat_search() command that takes into account the
last search's direction)

Günter

-- 
Milde at ife.et.tu-dresden.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]