Go Down

Topic: How do we copy a section of a char array that doesn't start at the beginning? (Read 1 time) previous topic - next topic

StuHooper

If I want to split a 140 char array into chars of 21 length  for display on an LCD screen, what command/s do I need to do so?




StuHooper

I have looked through http://www.nongnu.org/avr-libc/user-manual/group__avr__string.html but I can't seem to find anything that will copy from a certain point within the array.

Delta_G

Make a pointer to the element you want to start with and use it as an array name.  It will work just like an array that starts where you pointed to.

bperrybap

IF the goal is really line wrapping there are other ways to handle this.

--- bill

Tom Carpenter

If you are trying to text wrap with the gLCD library, that feature will be built into v3.1 which should be ready tonight or tomorrow.
~Tom~

Go Up