First naming, data is usually a lazy and poor name but here it's extra confusing because data is kinda plural, usually it would refer to some kind of buffer or larger chunk of something, or something abstract. What you have is a single character so why not: char character or symbol or whatever.
Then about performance; memory probably matters in an embedded application. On Cortex-M0 int is 32 bits and your structure as it is requires 3 bytes of padding, so it's 8 bytes per element. I would guess your space is 0-255 so use uint8_t for it, and you are down to 2 bytes per element and no padding.
Then more importantly, it all starts with getting the memory structures right. You have chosen interleaved form of character-space-character-space which prevents you from using every normal string handling library function, and even if you roll your own, they would be more complicated than the usual ones. Why not use planar form:
struct
{
char string[40];
uint8_t spaces[40];
}