Extracting hour/minute/second/date from String

Don't use String. The solutions using C strings (i.e., char arrays) are very efficient.

String will add at least 1600 bytes of FLASH to your program size and 10 bytes per String variable. Although String is fairly easy to use and understand, it will also cause random hangs and crashes as your program runs longer and/or grows in size and complexity. This is due to dynamic memory fragmentation caused by the heap management routines malloc and free.

The most recent example of the pitfalls of String can be seen here.

Related forum discussions:

1 Like