Clearing a non equal Char Bufferarray

Hi im struggleing with extra chars displayed on a 42x7 WS2812b
i want to have the const char stringP[] PROGMEM = " "; set to the Length of the
array no EXTRA letters so its tight on tight
cand get this to work there seams to be 40letters in the char m*

PLEASE Help

//                              0123456789012345678901234567890123         
const char stringA[] PROGMEM = "   Die Welt wird still        ";//0
const char stringB[] PROGMEM = "   der Fr}hling ist bunt      ";
const char stringD[] PROGMEM = "   Es werde Ostern            ";
const char stringE[] PROGMEM = "   Es werde Fr}hling          ";//3
const char stringF[] PROGMEM = "   Es riecht nach Gras        ";
const char stringG[] PROGMEM = "   so gr}n wie Hoffnung       ";
const char stringH[] PROGMEM = "   Der Lenz ist da            ";
const char stringI[] PROGMEM = "  > und auch die Blumen >     ";
//                              0123456789012345678901234567890123         
const char stringJ[] PROGMEM = " Und wieder hoppeln die Hasen ";//8
const char stringK[] PROGMEM = "  im Fr}hlingsliebesreigen    ";
const char stringL[] PROGMEM = " Buntgebl}mt mein Ostergruss  ";
const char stringM[] PROGMEM = " Viel Licht mit Bl}tenzweigen ";
const char stringN[] PROGMEM = "  Bunte Eier zur Osterstund   ";
const char stringO[] PROGMEM = " >3 >3 Frohe OSTERN  3> 3>    ";
const char stringP[] PROGMEM = "                              ";

const char* const string_table[] PROGMEM = {stringA,stringB,stringD,stringE,stringF,stringG,stringH,stringI
,stringJ,stringK,stringL,stringM,stringN,stringO,stringP};
char mybuffer[31];

void myText(int index,int color){
  //mybuffer[0] = '\0';
  strcpy_P(mybuffer, (char*)pgm_read_word(&(string_table[index])));
  char *m = mybuffer;
  if (color > 6){color = 0;}
  //char m;
  //while (*m) {
  for(uint8_t st=0;st<31;st++){      
      for( uint8_t step=0; step<FONT_WIDTH+INTERCHAR_SPACE  ; step++ ) {   // step though each column of the 1st char for smooth scrolling
         cli(); // interupts off
         sendString( m , step , colors[color][0], colors[color][1] ,colors[color][2] );    // RGB
         sei(); // interrupts on
      }
    m++;
    _delay_ms(300);   // Slows down scrolling by pausing 10 milliseconds between horizontal steps  
  }
  strcpy_P(mybuffer, (char*)pgm_read_word(&(string_table[14])));
}

You want display that text so it is right justified on 42 x 7 screen. Something like:

         1         2         3         4
123456789012345678901234567890123456789012

                       Die Welt wird still     
                     der Frühling ist bunt     
                           Es werde Ostern   

Is that correct ?
If so, simply to the shift before writing to the display.

Thank you for the Answer
@6v6gt NO
its scrolling text
id like to shorten the string to 2letters bevor and 2 after so differnt lenth eatch
id displays so many Spaces that the display is clear at some times
the buffer shoudt hold only the letters needed

You want display that text so it appears so on the 42 x 7 (7 rows, 42 columns?) screen.

         1         2         3         4
123456789012345678901234567890123456789012

Die Welt wird still  Die Welt wird still  
hling ist bunt  der Frühling ist bunt  der 
  Ostern  Es werde Ostern   Es werde Ostern  

If that is not correct, try yourself to indicate how the screen should appear.

The code you posted compiles and runs. It simply does not give the results you want. Is that correct ?

thanks
i did increase the myBuffer size to 38 and did write a routine to clear the buffer in Main loop
i simply cand understand why there are extra unknown noneASCII letters apeering in the buffer at space letter places mainly at the end

i did also replace the While(*m) toi a For and let this run to 31 insted the full Buffer size where the mystic part happens so it runs as on Plan

You are probably not terminating the character string correctly. A zero byte marks the end.

Please post ALL the code.