[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Program Space String Utility - winavr20030312
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] Program Space String Utility - winavr20030312 |
Date: |
Fri, 11 Apr 2003 09:47:07 +0200 (MET DST) |
Todd Lucas <address@hidden> wrote:
> If the assumption is correct, strlen_P will not return the correct
> length since it's not technically a null-terminated string. At a
> minimum, you'd need to append a 0x0 at the end of the array for it
> to work. Are you saying that there's a PROGMEM-related issue beyond
> that?
Besides, sizeof() is a compile-time evaluated operator, while
strlen_P() would cost runtime. (strlen() itself on a constant string
literal would not, since the compiler is allowed to optimize that
away, unless -ffreestanding is used).
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/