[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] new module proposal: strip
From: |
Davide Angelocola |
Subject: |
Re: [bug-gnulib] new module proposal: strip |
Date: |
Fri, 1 Sep 2006 20:01:52 +0200 |
User-agent: |
KMail/1.9.4 |
On Friday 01 September 2006 18:58, you wrote:
> Thanks; it looks already better.
>
> In multibyte strings you cannot "go backwards". You have to write the
> algorithm in a way that progresses from the first to the last multibyte
> character. (*) In this case, you can do so by moving from first to last,
> memorizing the position of the last non-whitespace character. More
> precisely, a pointer pointing after this character. When you have
> reached the end of the string, you put a '\0' where the memoized pointer
> points to, and are done.
Done. Thanks for the suggestions.
Best regards,
-- Davide Angelocola
trim
Description: Text document
trim.c
Description: Text Data
trim.h
Description: Text Data