this function add newline based on the chars length but i am sure there is a better way to achieve this with alot less space any idea?
void displaynow(String content){
if (content.length() <= 13){
oled.print(content);
}
else if(14 <= content.length() && content.length() <= 26){
oled.print(content.substring(0, 12));
oled.setCursor(0,2);
oled.print(content.substring(12, 26));
}else if (27 <= content.length() && content.length() <= 40){
oled.print(content.substring(0, 12));
oled.setCursor(0,2);
oled.print(content.substring(12, 26));
oled.setCursor(0,4);
oled.print(content.substring(26, 40));
}
else if (41 <= content.length() && content.length() <= 54){
oled.print(content.substring(0, 12));
oled.setCursor(0,2);
oled.print(content.substring(12, 26));
oled.setCursor(0,4);
oled.print(content.substring(26, 40));
oled.setCursor(0,6);
oled.print(content.substring(40, 54));
}
delay(8000);
}